fix: typo in portfolio-stats api (#1544)

This commit is contained in:
Stephen Zhou 2024-03-11 22:45:50 +08:00 committed by GitHub
parent 5a2fe7942d
commit a0bf66af5f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 7 additions and 7 deletions

View File

@ -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,
}
}

View File

@ -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>
)}
@ -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 || []}

View File

@ -78,7 +78,7 @@ export type SiteNavigationItem = {
export type PortfolioStats = {
videoViewsCount?: number
audoListensCount?: number
audioListensCount?: number
projectStarsCount?: number
textViewsCount?: number
commentsCount?: number