commerce/...[[...slug]]/product-page.tsx
Henrik Larsson 047e5fe566 Updates
2023-08-08 17:06:04 +02:00

20 lines
514 B
TypeScript

import ProductView from 'components/product/product-view';
import { notFound } from 'next/navigation';
interface ProductPageProps {
data: object | any;
}
// This is a Client Component. It receives data as props and
// has access to state and effects just like Page components
// in the `pages` directory.
export default function ProductPage({ data }: ProductPageProps) {
if (!data) {
return notFound();
}
const { product } = data;
return <ProductView product={product} relatedProducts={[]} />;
}