@sigitcode / nord / commits / 39f035d

fix async props

Seto Elkahfi committed Jun 7, 2025 at 13:42 UTC 39f035d8760bd4641badfb8661ea4eec335db75b
1 file changed +4 -5
app/[productId]/page.tsx
+4 -5
@@ -1,11 +1,10 @@
1 import { Reviews } from "@/components/reviews";
2 import { getProduct, sampleProductsReviews } from "@/lib/sample-data";
3
4 -export default async function ProductPage({
5 - params: { productId },
6 -}: {
7 - params: { productId: string };
8 -}) {
4 +type Params = Promise<{ productId: string }>
5 +
6 +export default async function ProductPage(props: { params: Params }) {
7 + const { productId } = await props.params;
8 const product = await getProduct(productId);
9
10 return <Reviews product={product} />;