import Link from 'next/link' import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card' import { formatCents } from '@/lib/utils/currency' import { ArrowRight } from 'lucide-react' interface RecentTx { id: string date: string description: string amountCents: number type: string accountName: string } export function RecentTransactions({ transactions }: { transactions: RecentTx[] }) { return ( Recent Transactions View all {transactions.length === 0 ? (

No transactions yet.

) : (
{transactions.map((tx) => { const date = new Date(tx.date) const label = date.toLocaleDateString('en-US', { month: 'short', day: 'numeric' }) return (

{tx.description}

{label} ยท {tx.accountName}

{tx.type === 'CREDIT' ? '+' : '-'}{formatCents(tx.amountCents)}
) })}
)}
) }