mirror of
https://github.com/vercel/commerce.git
synced 2025-07-22 20:26:49 +00:00
Fix
This commit is contained in:
@@ -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',
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user