canina/frontend/application/app/shop/page.tsx

10 lines
500 B
TypeScript

import ArchivePage from "../../components/ArchivePage";
export default async function Shop({ searchParams }: { searchParams: Promise<{ [key: string]: string | string[] | undefined }> }) {
const resolvedParams = await searchParams;
const category = typeof resolvedParams.category === 'string' ? resolvedParams.category : "all";
const search = typeof resolvedParams.search === 'string' ? resolvedParams.search : "";
return <ArchivePage initialCategory={category} initialSearch={search} />;
}