diff --git a/app/dashboard/guests/page.tsx b/app/dashboard/guests/page.tsx index 4a4cb1e..b073632 100644 --- a/app/dashboard/guests/page.tsx +++ b/app/dashboard/guests/page.tsx @@ -1,10 +1,12 @@ import { lusitana } from '@/app/ui/fonts'; - -export default function Page () { +import GuestsTable from '@/app/ui/guests/table'; + +export default function Page() { return (
+

Guests

-

Guests

+
); diff --git a/app/lib/definitions.ts b/app/lib/definitions.ts index 3f601a9..9b49c7e 100644 --- a/app/lib/definitions.ts +++ b/app/lib/definitions.ts @@ -16,6 +16,12 @@ export type Customer = { image_url: string; }; +export type Guest = { + id: string; + name: string; + email: string; +} + export type Invoice = { id: string; customer_id: string; diff --git a/app/ui/guests/table.tsx b/app/ui/guests/table.tsx index 9ea8a53..2b57e4e 100644 --- a/app/ui/guests/table.tsx +++ b/app/ui/guests/table.tsx @@ -2,123 +2,54 @@ 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'; +import { Guest } from '@/app/lib/definitions'; -export default async function guestsTable({ - query, - currentPage, -}: { - query: string; - currentPage: number; -}) { - const guests = await fetchFilteredguests(query, currentPage); +export default async function guestsTable() { + const guests: Guest[] = [ + { + id: '1', + name: 'John Doe', + email: 'foo@bar.com' + }, + { + id: '2', + name: 'Jane Doe', + email: 'jane@bar.com', + }, + ]; 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)} - - - -
- - -
-
-
-
+
+ + + + + + + + + + {guests.map((guest) => ( + + + + + + ))} + +
+ Name + + Email + + Status +
+ {guest.name} + + {guest.email} + + Confirmed +
); } diff --git a/tailwind.config.ts b/tailwind.config.ts index bf66330..01fe154 100644 --- a/tailwind.config.ts +++ b/tailwind.config.ts @@ -6,6 +6,7 @@ const config: Config = { './components/**/*.{js,ts,jsx,tsx,mdx}', './app/**/*.{js,ts,jsx,tsx,mdx}', ], + darkMode: 'selector', theme: { extend: { gridTemplateColumns: {