mirror of
https://github.com/vercel/commerce.git
synced 2025-07-22 20:26:49 +00:00
🎨 styles: list product with info component
:%s
This commit is contained in:
@@ -1,25 +1,4 @@
|
||||
import type { GetStaticPropsContext } from 'next'
|
||||
import commerce from '@lib/api/commerce'
|
||||
import { Layout } from '@components/common'
|
||||
|
||||
export async function getStaticProps({
|
||||
preview,
|
||||
locale,
|
||||
locales,
|
||||
}: GetStaticPropsContext) {
|
||||
const config = { locale, locales }
|
||||
const { pages } = await commerce.getAllPages({ config, preview })
|
||||
const { categories, brands } = await commerce.getSiteInfo({ config, preview })
|
||||
return {
|
||||
props: {
|
||||
pages,
|
||||
categories,
|
||||
brands,
|
||||
},
|
||||
revalidate: 200,
|
||||
}
|
||||
}
|
||||
|
||||
export default function NotFound() {
|
||||
return (
|
||||
<div>
|
||||
|
@@ -1,5 +1,5 @@
|
||||
import { Layout, RecipeDetail } from 'src/components/common';
|
||||
import { ProductInfoDetail } from 'src/components/modules/product-detail';
|
||||
import { ProductInfoDetail, ViewedProducts } from 'src/components/modules/product-detail';
|
||||
import { PRODUCT_DATA_TEST } from 'src/utils/demo-data';
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ export default function Demo() {
|
||||
return <>
|
||||
<ProductInfoDetail />
|
||||
<RecipeDetail ingredients={PRODUCT_DATA_TEST}/>
|
||||
<ViewedProducts/>
|
||||
</>
|
||||
}
|
||||
|
||||
|
@@ -1,11 +1,10 @@
|
||||
|
||||
import { Layout, RecipeDetail } from 'src/components/common'
|
||||
import { Layout } from 'src/components/common'
|
||||
import { ProductInfoDetail } from 'src/components/modules/product-detail'
|
||||
|
||||
export default function Slug() {
|
||||
return <>
|
||||
<ProductInfoDetail/>
|
||||
<RecipeDetail/>
|
||||
</>
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user