Skip to content

Commit

Permalink
feat: 선택 비율 API 연동
Browse files Browse the repository at this point in the history
  • Loading branch information
toothlessdev committed Sep 9, 2024
1 parent ee9c893 commit da61290
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/pages/ResultPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { Button } from "@/components/form/Button";
import TopBar from "@/components/layout/TopBar";
import { Text } from "@/components/typography";

import { useRatioResult } from "@/hooks/useRatioResult";
import { useResult } from "@/hooks/useResult";

import clubs from "@/constants/clubs";
Expand All @@ -24,6 +25,8 @@ import { css } from "@emotion/react";
export default function ResultPage() {
const { name, mbti, result, navigate } = useResult();

const { isPending, totalCount, mbtiCount } = useRatioResult();

return (
<>
<TopBar title="결과 보기" />
Expand Down Expand Up @@ -78,7 +81,11 @@ export default function ResultPage() {
</ClubItems>

<Text size="xs" weight="light">
<b>3,800명</b>의 참가자 중 <b>38명</b>이 이 유형이 나왔어요!
{!isPending && (
<>
<b>{totalCount}</b>의 참가자 중 <b>{mbtiCount}</b>이 이 유형이 나왔어요!
</>
)}
</Text>
</ResultContainer>

Expand Down

0 comments on commit da61290

Please sign in to comment.