import { getCustomers, deleteCustomer } from "@/lib/customers/actions" import { CustomerForm } from "@/components/dashboard/customer-form" import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow, } from "@/components/ui/table" import { Button } from "@/components/ui/button" import { Trash, Edit } from "lucide-react" export default async function CustomersPage() { const { data: customers } = await getCustomers() return (

Müşteriler

Ad Soyad E-Posta Telefon Adres İşlemler {customers?.length === 0 && ( Henüz müşteri bulunmuyor. )} {customers?.map((customer) => ( {customer.full_name} {customer.email || "-"} {customer.phone || "-"} {customer.address || "-"} } />
{ 'use server' await deleteCustomer(customer.id) }}>
))}
) }