'use client'; import { useRouter } from 'next/navigation'; import { Card, CardContent } from '@/components/ui/card'; import { SectionTitle, AmountCardItem, CheckPointItem } from '../components'; import type { DebtCollectionData } from '../types'; interface DebtCollectionSectionProps { data: DebtCollectionData; } export function DebtCollectionSection({ data }: DebtCollectionSectionProps) { const router = useRouter(); const handleClick = () => { if (data.detailButtonPath) { router.push(data.detailButtonPath); } }; return (
{data.cards.map((card) => ( ))}
{data.checkPoints.length > 0 && (
{data.checkPoints.map((cp) => ( ))}
)}
); }