From a0bf66af5f45dfac22653e1dddd77fbfe9845877 Mon Sep 17 00:00:00 2001 From: Stephen Zhou Date: Mon, 11 Mar 2024 22:45:50 +0800 Subject: [PATCH] fix: typo in portfolio-stats api (#1544) --- src/app/api/portfolio-stats/route.ts | 6 +++--- src/components/common/PostCard.tsx | 6 +++--- src/lib/types.ts | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/app/api/portfolio-stats/route.ts b/src/app/api/portfolio-stats/route.ts index 352e3d56..ca9ac07c 100644 --- a/src/app/api/portfolio-stats/route.ts +++ b/src/app/api/portfolio-stats/route.ts @@ -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, } } diff --git a/src/components/common/PostCard.tsx b/src/components/common/PostCard.tsx index dfee8156..d662358c 100644 --- a/src/components/common/PostCard.tsx +++ b/src/components/common/PostCard.tsx @@ -164,11 +164,11 @@ const Card = ({ /> )} - {!!post.stat?.portfolio?.audoListensCount && ( + {!!post.stat?.portfolio?.audioListensCount && ( )} @@ -259,7 +259,7 @@ const Card = ({ ) }} > - +