Skip to content

Commit

Permalink
Merge branch 'fix/COT-116-resolve-cs-hall-of-fame-issue' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
Donghyun Hwang committed Dec 30, 2024
2 parents 5a7f0c4 + 36daef8 commit a8e412c
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/pages/MyPage/CSRecord.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,14 @@ const CSRecord = () => {
generationId || undefined,
);

const { targetGeneration } = useGeneration({ generationId: selectedGenerationId });
const { currentGeneration, targetGeneration } = useGeneration({
generationId: selectedGenerationId,
});

const paramsGenerationId = targetGeneration?.generationId || currentGeneration?.generationId;

const { data: hallOfFameData } = useSWR(
'/v1/api/mypage/hall-of-fame?generationId=' + targetGeneration?.generationId,
'/v1/api/mypage/hall-of-fame?generationId=' + paramsGenerationId,
fetcher,
);

Expand All @@ -62,7 +66,7 @@ const CSRecord = () => {
<InfoDiv>
<BadgeDiv>
<Badge backgroundcolor="rgba(37, 156, 46, 0.52)">
{targetGeneration?.generationNumber}
{currentGeneration?.generationNumber}
</Badge>
<Badge backgroundcolor="rgba(235, 83, 83, 0.51)">
{localeKr[(user?.position as keyof typeof localeKr) || 'NONE']}
Expand Down

0 comments on commit a8e412c

Please sign in to comment.