import Image from 'next/image'; import { UpdateInvoice, DeleteInvoice } from '@/app/ui/guests/buttons'; import gueststatus from '@/app/ui/guests/status'; import { formatDateToLocal, formatCurrency } from '@/app/lib/utils'; import { fetchFilteredguests } from '@/app/lib/data'; export default async function guestsTable({ query, currentPage, }: { query: string; currentPage: number; }) { const guests = await fetchFilteredguests(query, currentPage); return (
{guests?.map((invoice) => (
{`${invoice.name}'s

{invoice.name}

{invoice.email}

{formatCurrency(invoice.amount)}

{formatDateToLocal(invoice.date)}

))}
{guests?.map((invoice) => ( ))}
Customer Email Amount Date Status Edit
{`${invoice.name}'s

{invoice.name}

{invoice.email} {formatCurrency(invoice.amount)} {formatDateToLocal(invoice.date)}
); }