Skip to content

Commit 6c33424

Browse files
refactor:
solve hydration error in the hachathon rewards card
1 parent 4ac4dac commit 6c33424

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

public/locales/en/common.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@
122122
"communities.overview.challenge.team.setup.info": "To complete the team challenge, you need to follow these steps:",
123123
"communities.overview.challenge.team.setup.submit-title": "Submit your team",
124124
"communities.overview.challenge.submission.description": "Paste the code of your team below and it will automatically link to all the profiles",
125-
"communities.challenge.submission.hint": "Submitions will be enabled when when all the team members accept the invitation and the team is fully formed.",
125+
"communities.challenge.submission.hint": "Submissions will be enabled when when all the team members accept the invitation and the team is fully formed.",
126126
"communities.overview.challenge.deadline": "Deadline",
127127
"communities.overview.challenge.submissions-closed": "Submissions for this challenge are now closed.",
128128
"communities.challenge.hint": "Hint",

src/components/sections/challenges/Rewards.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export function OverviewRewards(): ReactElement {
5050
<Coin size="medium" token={reward?.token} />
5151
<div className="text-sm space-y-2 md:pl-2 max-w-max">
5252
{challenge?.isHackathon ? (
53-
<HackathonPrize reward={reward} />
53+
<HackathonPrize reward={reward} description={t("communities.overview.challenge.rewards")} />
5454
) : (
5555
<>
5656
<div className="flex gap-1 text-gray-700 font-medium">

src/components/sections/challenges/_partials/HackathonPrize.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
import { Distribution, Reward } from "@/types/course";
2-
import { useTranslation } from "react-i18next";
32

4-
export default function HackathonPrize({ reward }: { reward: Reward }) {
5-
const { t } = useTranslation();
3+
export default function HackathonPrize({ reward, description }: { reward: Reward; description: string }) {
64
const { first, second, third } = reward?.distribution || ({} as Distribution);
75
return (
86
<>
97
<div className="flex gap-1 text-gray-700 font-medium">
108
<span>{`$${reward?.amount} Prize Pool`}</span>
11-
<span>{t("communities.overview.challenge.rewards")}</span>
9+
<span>{description}</span>
1210
</div>
1311
<div className="text-gray-400 text-xs font-medium leading-3 mt-1 flex">
1412
<span>{`1st Place $${first}; 2nd Place $${second}; 3rd Place $${third}`}</span>

0 commit comments

Comments
 (0)