Skip to content

Commit

Permalink
Update generated paths
Browse files Browse the repository at this point in the history
  • Loading branch information
goncy committed Sep 4, 2024
1 parent 662694b commit 5153f72
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/app/[[...product]]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,13 @@ import StoreScreen from "@/modules/store/screens/Store";

export const dynamic = "force-static";

export const dynamicParams = false;

export async function generateStaticParams() {
const products = await api.list();

// Build index for the home page and then for each product
return [{}].concat(products.map((product) => ({product: [product.id]}))) as Record<
string,
string[]
>[];
return products.map((product) => ({product: [product.id]})).concat({product: []});
}

export async function generateMetadata({
Expand Down

0 comments on commit 5153f72

Please sign in to comment.