Merge branch 'feature/m1-get-product-detail' of github.com:KieIO/grocery-vercel-commerce into feature/m3-add-product-to-cart-product-detail

This commit is contained in:
DatNguyen
2021-10-11 16:05:56 +07:00
15 changed files with 79 additions and 46 deletions

View File

@@ -12,7 +12,7 @@ import { PromiseWithKey } from 'src/utils/types.utils'
export default function Slug({ product, relevantProducts, collections }: InferGetStaticPropsType<typeof getStaticProps>) {
return <>
<ProductInfoDetail />
<ProductInfoDetail productDetail={product} collections={collections}/>
<RecipeDetail ingredients={INGREDIENT_DATA_TEST} />
<RecommendedRecipes data={RECIPE_DATA_TEST} />
<ReleventProducts data={relevantProducts} collections={collections}/>

View File

@@ -1,11 +1,12 @@
import commerce from '@lib/api/commerce';
import { GetStaticPropsContext } from 'next';
import { ProductCard } from '@commerce/types/product';
import { Layout, ListProductCardSkeleton } from 'src/components/common';
interface Props {
products: any
productDetail: ProductCard[],
}
export default function Home({ products }: Props) {
export default function Home({ productDetail }: Props) {
return (
<>
{/* <ListProductCardSkeleton /> */}