Skip to content

Commit

Permalink
feat: CardListPage 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
bytrustu committed Mar 3, 2024
1 parent 9b70fe7 commit 24e878d
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions src/pages/CardListPage.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import { AppLayout, CardDisplay, useCard, useFunnel } from '@/components';
import { Typography, VStack } from '@/shared/components';

export const CardListPage = () => {
const { ownerCards, resetCurrentCard } = useCard();
const { goToNext } = useFunnel();

const handleCardAddPageMove = () => {
resetCurrentCard();
goToNext();
};

return (
<AppLayout>
<AppLayout.Header>
<Typography variant="headline">보유 카드</Typography>
</AppLayout.Header>
<AppLayout.Body>
<VStack gap="20px" padding="20px 0">
{ownerCards.map((ownerCard, index) => (
<VStack key={`card-list-${index}`} gap="10px" alignItems="center" justifyContent="center">
<CardDisplay
size="small"
label={ownerCard.label}
color={ownerCard.color}
cardNumber={ownerCard.cardNumber}
expirationDate={ownerCard.expirationDate}
ownerName={ownerCard.ownerName}
/>
<Typography variant="body" textAlign="center">
{ownerCard.description}
</Typography>
</VStack>
))}
</VStack>
</AppLayout.Body>
<AppLayout.Footer height="300px">
<VStack paddingTop="20px" alignItems="center">
<CardDisplay.Add onClick={handleCardAddPageMove} />
</VStack>
</AppLayout.Footer>
</AppLayout>
);
};

0 comments on commit 24e878d

Please sign in to comment.