mirror of
https://github.com/vercel/commerce.git
synced 2025-07-22 20:26:49 +00:00
Iterations and TS error fixes
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import ProductView from "components/product/product-view";
|
||||
import { notFound } from "next/navigation";
|
||||
|
||||
interface ProductPageProps {
|
||||
data: object | any
|
||||
@@ -8,6 +9,10 @@ interface ProductPageProps {
|
||||
// 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 (
|
||||
|
Reference in New Issue
Block a user