4
0
forked from crowetic/commerce

Merge branch 'master' of github.com:okbel/e-comm-example

This commit is contained in:
Belen Curcio 2020-10-02 14:59:51 -03:00
commit 307c0067cd

View File

@ -37,10 +37,11 @@ export async function getStaticPaths() {
const { products } = await getAllProductPaths() const { products } = await getAllProductPaths()
return { return {
// paths: products.map((product) => ({ paths: products.map((product) => {
// params: { slug: product!.node.path.trim() }, const { path } = product!.node
// })), // Exclude the slashes: `/slug/` -> `slug`
paths: [], return { params: { slug: path.substring(1, path.length - 1) } }
}),
fallback: 'unstable_blocking', fallback: 'unstable_blocking',
} }
} }