Skip to content

Commit

Permalink
✨ 지난 테스트 조회 기능
Browse files Browse the repository at this point in the history
  • Loading branch information
jhsung23 committed Mar 11, 2024
1 parent 11d06e2 commit 9617d29
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion src/app/mypage/_components/MyTest.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,25 @@
'use client';

import { ResultCard, ResultCardContainer } from '@/components/features/test/resultCard';
import { EmptyTest } from '@/components/shared';
import { useGetMyTest } from '@/hooks/test';

const MyTest = () => {
const { data, status } = useGetMyTest();

return (
<>
<EmptyTest />
<ResultCardContainer>
{status === 'pending' ? (
<></>
) : status === 'error' ? (
<></>
) : data.length > 0 ? (
data.map((result) => <ResultCard key={result.id} result={result} />)
) : (
<EmptyTest />
)}
</ResultCardContainer>
</>
);
};
Expand Down

0 comments on commit 9617d29

Please sign in to comment.