Skip to content

Commit 9af1129

Browse files
committed
fix: challenge card
1 parent 2d72d61 commit 9af1129

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/components/cards/challenge/Challenge.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export default function ChallengeCard({ data, community, isCourseEnd }: Challeng
4545
)}
4646
<div className="text-lg text-gray-900 font-medium leading-normal mb-3">{data.name}</div>
4747
<Badges challenge={data} />
48-
<div className="text-sm text-gray-700">{data.description}</div>
48+
<div className="text-base text-gray-700">{data.description}</div>
4949
</div>
5050
<div className="divide-y-2 divide-gray-200 divide-dotted flex flex-col mt-8">
5151
{learningMaterialsCount && (
@@ -65,9 +65,9 @@ export default function ChallengeCard({ data, community, isCourseEnd }: Challeng
6565
<div className="mx-auto relative rounded-full mb-5 w-[147px] h-[184px]">
6666
<Image src={data?.certificateData?.icon} alt="achievement" fill priority />
6767
</div>
68-
<div className="">
68+
<div>
6969
<h1 className="font-bold text-gray-400 text-xs uppercase pb-3">{t("communities.overview.challenge.unlock.certificate")}</h1>
70-
<RewardCertificate rewards={data?.rewards} />
70+
<RewardCertificate rewards={data?.rewards} isChallengeCard/>
7171
</div>
7272
{data?.isHackathon && <p className="py-1.5 border-t border-gray-200 text-sm">{t("communities.overview.challenge.participate", { token: reward?.token })}</p>}
7373
</div>

src/components/cards/challenge/RewardCertificate.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { ReactElement } from "react";
88
interface RewardCertificateProps {
99
rewards: Reward[];
1010
isReward?: boolean;
11+
isChallengeCard:boolean;
1112
}
1213

1314
/**
@@ -18,7 +19,7 @@ interface RewardCertificateProps {
1819
* @returns {JSX.Element} The rendered RewardCertificate component.
1920
*/
2021

21-
export default function RewardCertificate({ rewards, isReward }: RewardCertificateProps): ReactElement {
22+
export default function RewardCertificate({ rewards, isReward, isChallengeCard }: RewardCertificateProps): ReactElement {
2223
const { t } = useTranslation();
2324
return (
2425
<>
@@ -32,7 +33,7 @@ export default function RewardCertificate({ rewards, isReward }: RewardCertifica
3233
)}
3334
>
3435
<Coin size="small" token={reward?.token} />
35-
<div className="text-base">
36+
<div className={`${isChallengeCard? "text-sm":"text-base"}`}>
3637
<span>
3738
{shortenNumber(reward.amount)} {reward.token}
3839
</span>

0 commit comments

Comments
 (0)