Skip to content

Commit 7268594

Browse files
committed
fix: replace courses by challenges
1 parent 234a27c commit 7268594

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

src/components/cards/community/index.tsx

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,6 @@ export default function CommunityCard({ showRewards = true, community }: Communi
5858
};
5959
}, [colors]);
6060

61-
const renderCommunityMetrics = () => {
62-
if (community.challenges) {
63-
return t(community.challenges !== 1 ? "communities.card.challenges" : "communities.card.challenge", { count: community.challenges });
64-
}
65-
return t(community.courses !== 1 ? "communities.card.courses" : "communities.card.course", { count: community.courses });
66-
};
67-
6861
return (
6962
<ThemeWrapper colors={community.colors}>
7063
<div onClick={() => router.push(path)} className="block h-full hover:cursor-pointer">
@@ -90,7 +83,9 @@ export default function CommunityCard({ showRewards = true, community }: Communi
9083
<div className="flex justify-between flex-none mt-4">
9184
<div className="flex flex-col space-y-0">
9285
<div className="mt-4 font-medium text-theme-accent">{t("communities.card.earn")}</div>
93-
<div className="mt-4 font-light text-theme-accent">{renderCommunityMetrics()}</div>
86+
<div className="mt-4 font-light text-theme-accent">
87+
{t(community.challenges !== 1 ? "communities.card.challenges" : "communities.card.challenge", { count: community.challenges })}
88+
</div>
9489
</div>
9590
<div className="mt-4 align-middle">
9691
<Link href={path}>

0 commit comments

Comments
 (0)