-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ added customers table with skeletons
- Loading branch information
1 parent
cd08d44
commit 9737805
Showing
3 changed files
with
213 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,34 @@ | ||
import { Metadata } from 'next'; | ||
import { Suspense } from 'react'; | ||
import Search from '@/app/ui/search'; | ||
import CustomersTable from '@/app/ui/customers/table'; | ||
import { lusitana } from '@/app/ui/fonts'; | ||
import { CustomersTableSkeleton } from '@/app/ui/skeletons'; | ||
|
||
export const metadata: Metadata = { | ||
title: 'Customers', | ||
}; | ||
|
||
export default function Page() { | ||
return <p>Customers Page</p>; | ||
export default async function Page(props: { | ||
searchParams?: Promise<{ | ||
query?: string; | ||
page?: string; | ||
}>; | ||
}) { | ||
const searchParams = await props.searchParams; | ||
const query = searchParams?.query ?? ''; | ||
|
||
return ( | ||
<div className="w-full"> | ||
<div className="flex w-full items-center justify-between"> | ||
<h1 className={`${lusitana.className} text-2xl`}>Customers</h1> | ||
</div> | ||
<div className="mt-4 flex items-center justify-between gap-2 md:mt-8"> | ||
<Search placeholder="Search customers..." /> | ||
</div> | ||
<Suspense key={query} fallback={<CustomersTableSkeleton />}> | ||
<CustomersTable query={query} /> | ||
</Suspense> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters