mirror of
https://github.com/vercel/commerce.git
synced 2025-05-15 22:16:58 +00:00
22 lines
523 B
TypeScript
22 lines
523 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={[]} />
|
|
)
|
|
}
|