mirror of
https://github.com/vercel/commerce.git
synced 2025-06-07 16:56:59 +00:00
This commit applies the Next.js 15 PageProps convention (where `params` and `searchParams` are Promises) to all relevant dynamic server route page components. This resolves the build error: "Type '...' does not satisfy the constraint 'PageProps'. Types of property 'params' are incompatible. Type '{...}' is missing the following properties from type 'Promise<any>': then, catch, finally, [Symbol.toStringTag]" The following pages were updated: - `app/content/[slug]/page.tsx` - `app/product/[handle]/page.tsx` - `app/search/[collection]/page.tsx` In each of these files, the props interface was updated to define `params` and `searchParams` as Promises, and the component logic was modified to `await params` to access their resolved values. `app/search/page.tsx` was verified as a Client Component using `useSearchParams()` and did not require these changes.