git init
This commit is contained in:
23
app/dashboard/customers/page.tsx
Normal file
23
app/dashboard/customers/page.tsx
Normal file
@@ -0,0 +1,23 @@
|
||||
import { Metadata } from 'next';
|
||||
import CustomersTable from "@/app/ui/customers/table";
|
||||
import {fetchFilteredCustomers, fetchInvoicesPages} from "@/app/lib/data";
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: 'Customers',
|
||||
}
|
||||
|
||||
export default async function Page(props: {
|
||||
searchParams?: Promise<{
|
||||
query?: string;
|
||||
page?: string;
|
||||
}>;
|
||||
}) {
|
||||
const searchParams = await props.searchParams;
|
||||
const query = searchParams?.query || '';
|
||||
const currentPage = Number(searchParams?.page) || 1;
|
||||
const customers = await fetchFilteredCustomers(query);
|
||||
|
||||
return (
|
||||
<CustomersTable customers={customers}/>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user