import SearchFilters from "./SearchFilters"; import { Suspense } from "react"; interface ProductsPageProps { searchParams: Promise<{ category?: string; // Optional query string: ?category=shoes sort?: string; // Optional query string: ?sort=asc }>; } export default async function ProductsPage({ searchParams, }: ProductsPageProps) { // Await the searchParams Promise const { category = "all", sort = "featured" } = await searchParams; return (

Products Catalog

Server Params Filter Category: {category}

Server Params Sorting By: {sort}

{/* Render the Client Component inside a Suspense boundary */} Loading filters...}>
); }