diff --git a/src/app/(storefront)/products/[handle]/page.tsx b/src/app/(storefront)/products/[handle]/page.tsx index a9a6de8..3fb63f9 100644 --- a/src/app/(storefront)/products/[handle]/page.tsx +++ b/src/app/(storefront)/products/[handle]/page.tsx @@ -10,9 +10,9 @@ function shuffleArray(array: T[]) { } interface ProductPageProps { - params: { + params: Promise<{ handle: string; - }; + }>; } async function fetchProduct(handle: string, region: HttpTypes.StoreRegion | undefined) { @@ -91,7 +91,8 @@ async function fetchProducts(region: HttpTypes.StoreRegion | undefined, count: n } } -export default async function ProductPage({ params }: ProductPageProps) { +export default async function ProductPage(props: ProductPageProps) { + const params = await props.params; // const { region } = useRegion(); const { handle } = params; // Extract the handle from the params const product: HttpTypes.StoreProduct = await fetchProduct(handle, undefined); @@ -99,6 +100,6 @@ export default async function ProductPage({ params }: ProductPageProps) { return ( // Render the client component and pass necessary props - + () ); }