forked from crowetic/commerce
changes
This commit is contained in:
parent
a3a2c15f70
commit
28b244760a
@ -94,7 +94,7 @@ async function getAllProducts({
|
|||||||
variables?: ProductVariables
|
variables?: ProductVariables
|
||||||
config?: BigcommerceConfig
|
config?: BigcommerceConfig
|
||||||
preview?: boolean
|
preview?: boolean
|
||||||
} = {}): Promise<{ products: Product[] }> {
|
} = {}): Promise<{ products: Product[] | any[] }> {
|
||||||
config = getConfig(config)
|
config = getConfig(config)
|
||||||
|
|
||||||
const locale = vars.locale || config.locale
|
const locale = vars.locale || config.locale
|
||||||
@ -127,7 +127,7 @@ async function getAllProducts({
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
return { products: products.map(normalizeProduct) }
|
return { products }
|
||||||
}
|
}
|
||||||
|
|
||||||
export default getAllProducts
|
export default getAllProducts
|
||||||
|
@ -93,7 +93,7 @@ async function getProduct({
|
|||||||
variables: ProductVariables
|
variables: ProductVariables
|
||||||
config?: BigcommerceConfig
|
config?: BigcommerceConfig
|
||||||
preview?: boolean
|
preview?: boolean
|
||||||
}): Promise<Product | {}> {
|
}): Promise<Product | {} | any> {
|
||||||
config = getConfig(config)
|
config = getConfig(config)
|
||||||
|
|
||||||
const locale = vars.locale || config.locale
|
const locale = vars.locale || config.locale
|
||||||
@ -111,7 +111,7 @@ async function getProduct({
|
|||||||
setProductLocaleMeta(product)
|
setProductLocaleMeta(product)
|
||||||
}
|
}
|
||||||
|
|
||||||
return { product: normalizeProduct(product) }
|
return { product }
|
||||||
}
|
}
|
||||||
|
|
||||||
return {}
|
return {}
|
||||||
|
@ -57,7 +57,7 @@
|
|||||||
"lodash.debounce": "^4.0.8",
|
"lodash.debounce": "^4.0.8",
|
||||||
"lodash.random": "^3.2.0",
|
"lodash.random": "^3.2.0",
|
||||||
"lodash.throttle": "^4.1.1",
|
"lodash.throttle": "^4.1.1",
|
||||||
"next": "^10.0.5-canary.11",
|
"next": "^10.0.5",
|
||||||
"next-seo": "^4.11.0",
|
"next-seo": "^4.11.0",
|
||||||
"next-themes": "^0.0.4",
|
"next-themes": "^0.0.4",
|
||||||
"postcss-nesting": "^7.0.1",
|
"postcss-nesting": "^7.0.1",
|
||||||
|
7
pages/index2.tsx
Normal file
7
pages/index2.tsx
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
import { Layout } from '@components/common'
|
||||||
|
|
||||||
|
export default function Home() {
|
||||||
|
return <>Hello</>
|
||||||
|
}
|
||||||
|
|
||||||
|
Home.Layout = Layout
|
@ -5038,7 +5038,7 @@ next-unused@^0.0.3:
|
|||||||
madge "^3.8.0"
|
madge "^3.8.0"
|
||||||
ts-loader "^7.0.0"
|
ts-loader "^7.0.0"
|
||||||
|
|
||||||
next@^10.0.5-canary.11:
|
next@^10.0.5:
|
||||||
version "10.0.5"
|
version "10.0.5"
|
||||||
resolved "https://registry.yarnpkg.com/next/-/next-10.0.5.tgz#8071e0aa1883266c91943aa7c6b73deadb064793"
|
resolved "https://registry.yarnpkg.com/next/-/next-10.0.5.tgz#8071e0aa1883266c91943aa7c6b73deadb064793"
|
||||||
integrity sha512-yr7ap2TLugf0aMHz+3JoKFP9CCkFE+k6jCfdUymORhptjLYZbD3YGlTcUC1CRl+b5Phlbl7m/WUIPde0VcguiA==
|
integrity sha512-yr7ap2TLugf0aMHz+3JoKFP9CCkFE+k6jCfdUymORhptjLYZbD3YGlTcUC1CRl+b5Phlbl7m/WUIPde0VcguiA==
|
||||||
|
Loading…
x
Reference in New Issue
Block a user