mirror of
https://github.com/vercel/commerce.git
synced 2025-07-22 20:26:49 +00:00
build changes
This commit is contained in:
@@ -6,14 +6,13 @@ import { ProductGrid } from '@components/product'
|
||||
export async function getStaticProps({ preview }: GetStaticPropsContext) {
|
||||
const { products } = await getAllProducts()
|
||||
return {
|
||||
props: { products },
|
||||
props: { products: products.slice(0, 6) },
|
||||
}
|
||||
}
|
||||
|
||||
export default function Home({
|
||||
products,
|
||||
}: InferGetStaticPropsType<typeof getStaticProps>) {
|
||||
console.log('PRODUCTS', products)
|
||||
return <ProductGrid products={products} />
|
||||
}
|
||||
|
||||
|
@@ -10,7 +10,7 @@ export async function getStaticProps({
|
||||
}: GetStaticPropsContext<{ slug: string }>) {
|
||||
const { product } = await getProduct({ variables: { slug: params!.slug } })
|
||||
const productData = {
|
||||
title: 'T-Shirt',
|
||||
name: 'T-Shirt',
|
||||
description: `
|
||||
Nothing undercover about this tee. Nope. This is the official Bad
|
||||
Boys tee. Printed in white or black ink on Black, Brown, or Oatmeal.
|
||||
@@ -19,7 +19,8 @@ export async function getStaticProps({
|
||||
run. Printing starts when the drop ends. Reminder: Bad Boys For
|
||||
Life. Shipping may take 10+ days due to COVID-19.
|
||||
`,
|
||||
price: '$50',
|
||||
images: null,
|
||||
prices: '$50',
|
||||
colors: ['black', 'white', 'pink'],
|
||||
sizes: ['s', 'm', 'l', 'xl', 'xxl'],
|
||||
}
|
||||
@@ -47,8 +48,6 @@ export default function Slug({
|
||||
product,
|
||||
productData,
|
||||
}: InferGetStaticPropsType<typeof getStaticProps>) {
|
||||
console.log('PRODUCT', product)
|
||||
|
||||
const router = useRouter()
|
||||
|
||||
return router.isFallback ? (
|
||||
|
Reference in New Issue
Block a user