diff --git a/src/pages/MyPage/CSRecord.tsx b/src/pages/MyPage/CSRecord.tsx index 8d918249..e3f78618 100644 --- a/src/pages/MyPage/CSRecord.tsx +++ b/src/pages/MyPage/CSRecord.tsx @@ -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, ); @@ -62,7 +66,7 @@ const CSRecord = () => { - {targetGeneration?.generationNumber}기 + {currentGeneration?.generationNumber}기 {localeKr[(user?.position as keyof typeof localeKr) || 'NONE']}