forked from crowetic/commerce
Fix
This commit is contained in:
parent
01f5b460d1
commit
b6bbcf705f
@ -21,7 +21,7 @@
|
||||
"@types/classnames": "^2.2.10",
|
||||
"classnames": "^2.2.6",
|
||||
"lodash": "^4.17.20",
|
||||
"next": "^9.5.4-canary.20",
|
||||
"next": "^9.5.4-canary.23",
|
||||
"postcss-nested": "^5.0.1",
|
||||
"postcss-nesting": "^7.0.1",
|
||||
"react": "^16.13.1",
|
||||
|
@ -37,9 +37,11 @@ export async function getStaticPaths() {
|
||||
const { products } = await getAllProductPaths()
|
||||
|
||||
return {
|
||||
paths: products.map((product) => ({
|
||||
params: { slug: product!.node.path },
|
||||
})),
|
||||
paths: products.map((product) => {
|
||||
const { path } = product!.node
|
||||
// Exclude the slashes: `/slug/` -> `slug`
|
||||
return { params: { slug: path.substring(1, path.length - 1) } }
|
||||
}),
|
||||
fallback: 'unstable_blocking',
|
||||
}
|
||||
}
|
||||
|
@ -5039,7 +5039,7 @@ next-tick@~1.0.0:
|
||||
resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.0.0.tgz#ca86d1fe8828169b0120208e3dc8424b9db8342c"
|
||||
integrity sha1-yobR/ogoFpsBICCOPchCS524NCw=
|
||||
|
||||
next@^9.5.4-canary.20:
|
||||
next@^9.5.4-canary.23:
|
||||
version "9.5.4-canary.23"
|
||||
resolved "https://registry.yarnpkg.com/next/-/next-9.5.4-canary.23.tgz#ce0e7b9e284b5f9b718610ff5363827d3dfecd44"
|
||||
integrity sha512-uNMIonQUZr5uZvmuMJ1Pq2akfzEQa60mQPVkMUUe12eHcE3efsA1M3W+SZfcSnSkCna53qU9Km1pNdGbVLe1Cg==
|
||||
|
Loading…
x
Reference in New Issue
Block a user