mirror of
https://github.com/vercel/commerce.git
synced 2025-05-20 16:36:59 +00:00
fix build error: the provided export path doesn't match the page
This commit is contained in:
parent
f7969b87e1
commit
23b836252a
@ -5,7 +5,13 @@ import { HomeProductsList } from '/components/home.js';
|
|||||||
export async function generateStaticParams() {
|
export async function generateStaticParams() {
|
||||||
const collections = await getCollections();
|
const collections = await getCollections();
|
||||||
|
|
||||||
return collections.map(collection => ({ collection: collection.handle }));
|
const params = collections
|
||||||
|
.map(collection => ({
|
||||||
|
collection: collection.handle,
|
||||||
|
}))
|
||||||
|
.filter(param => param.collection.length > 0);
|
||||||
|
|
||||||
|
return params;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default async function CollectionPage({ params: { collection } }) {
|
export default async function CollectionPage({ params: { collection } }) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user