"use client" import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@/components/ui/table" import type { Cliente } from "@/lib/supabase" interface CustomerTableProps { customers: Cliente[] } export function CustomerTable({ customers }: CustomerTableProps) { if (customers.length === 0) { return (
Nenhum cliente cadastrado.
) } return (
Nome E-mail CPF/CNPJ Telefone Cadastro {customers.map((c) => ( {c.nome} {c.email} {c.cpf_cnpj ?? "—"} {c.telefone ?? "—"} {new Date(c.created_at).toLocaleDateString("pt-BR")} ))}
) }