Skip to content

Commit

Permalink
fix: typo in portfolio-stats api (#1544)
Browse files Browse the repository at this point in the history
  • Loading branch information
hyoban authored Mar 11, 2024
1 parent 5a2fe79 commit a0bf66a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/app/api/portfolio-stats/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@ export async function GET(req: Request) {
})
).text()
const $ = cheerio.load(data)
const audoListensCount = parseInt($(".stat").eq(0).text())
const audioListensCount = parseInt($(".stat").eq(0).text())
const commentsCount = parseInt($(".stat").eq(1).text())
if (audoListensCount || commentsCount) {
if (audioListensCount || commentsCount) {
result = {
audoListensCount,
audioListensCount,
commentsCount,
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/components/common/PostCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -164,11 +164,11 @@ const Card = ({
/>
</span>
)}
{!!post.stat?.portfolio?.audoListensCount && (
{!!post.stat?.portfolio?.audioListensCount && (
<span className="xlog-post-views inline-flex items-center">
<i className="i-mingcute-headphone-line mr-[2px] text-base" />
<FormattedNumber
value={post.stat.portfolio.audoListensCount}
value={post.stat.portfolio.audioListensCount}
/>
</span>
)}
Expand Down Expand Up @@ -259,7 +259,7 @@ const Card = ({
)
}}
>
<span className="w-5 h-5 inline-block mr-[6px]">
<span className="size-5 inline-block mr-[6px]">
<Avatar
cid={character?.characterId}
images={character?.metadata?.content?.avatars || []}
Expand Down
2 changes: 1 addition & 1 deletion src/lib/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export type SiteNavigationItem = {

export type PortfolioStats = {
videoViewsCount?: number
audoListensCount?: number
audioListensCount?: number
projectStarsCount?: number
textViewsCount?: number
commentsCount?: number
Expand Down

0 comments on commit a0bf66a

Please sign in to comment.