'use client' import { Download } from 'lucide-react' import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card' import { Badge } from '@/components/ui/badge' import { Button } from '@/components/ui/button' import type { Invoice } from '@/lib/types' interface InvoiceTableProps { invoices: Invoice[] } const statusColors: Record = { paid: 'bg-emerald-500/10 text-emerald-400', pending: 'bg-yellow-500/10 text-yellow-400', refunded: 'bg-red-500/10 text-red-400', cancelled: 'bg-gray-500/10 text-gray-400', } export function InvoiceTable({ invoices }: InvoiceTableProps) { return ( Invoice History
{invoices.map((invoice) => ( ))}
Description Date Amount Status Download

{invoice.description}

{invoice.projectId && (

Project: {invoice.projectId}

)}
{new Date(invoice.date).toLocaleDateString()}

{invoice.total} {invoice.currency}

{invoice.status} {invoice.downloadUrl && ( )}
) }