mirror of
https://github.com/vercel/commerce.git
synced 2025-07-25 11:11:24 +00:00
Progress with LocalProvider
This commit is contained in:
@@ -12,6 +12,13 @@ export async function getStaticProps({
|
||||
locale,
|
||||
locales,
|
||||
}: GetStaticPropsContext) {
|
||||
// Disabling page if Feature is not available
|
||||
if (!process.env.COMMERCE_CART_ENABLED) {
|
||||
return {
|
||||
notFound: true,
|
||||
}
|
||||
}
|
||||
|
||||
const config = { locale, locales }
|
||||
const { pages } = await commerce.getAllPages({ config, preview })
|
||||
const { categories } = await commerce.getSiteInfo({ config, preview })
|
||||
|
Reference in New Issue
Block a user