import { Avatar, AvatarFallback } from "@/components/ui/avatar" interface VendaRecente { id: string valor_centavos: number created_at: string metodo_pagamento: string | null clientes: { nome: string; email: string } | null produtos: { nome: string } | null } export function RecentSales({ vendas }: { vendas: VendaRecente[] }) { if (vendas.length === 0) { return (
Nenhuma venda confirmada ainda.
) } return ({v.clientes?.nome ?? "—"}
{v.produtos?.nome ?? "—"}
{(v.valor_centavos / 100).toLocaleString("pt-BR", { style: "currency", currency: "BRL", })}
{new Date(v.created_at).toLocaleDateString("pt-BR")}