Skip to content

Commit

Permalink
Only build legacy pages on production
Browse files Browse the repository at this point in the history
  • Loading branch information
pookmish committed Oct 8, 2024
1 parent 8d84723 commit 11f0fa4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/books/legacy/[id]/comp/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const LegacyBookPage = async ({params}: {params: {id: string}}) => {
}

export const generateStaticParams = async (): Promise<Array<{id: string}>> => {
if (process.env.VERCEL_ENV === "preview") return []
const params = await getLegacyBookPaths()
return params.map(item => ({id: item.id.toString()}))
}
Expand Down
1 change: 1 addition & 0 deletions app/books/legacy/[id]/extra/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const LegacyBookPage = async ({params}: {params: {id: string}}) => {
}

export const generateStaticParams = async (): Promise<Array<{id: string}>> => {
if (process.env.VERCEL_ENV === "preview") return []
const params = await getLegacyBookPaths()
return params.map(item => ({id: item.id.toString()}))
}
Expand Down
1 change: 1 addition & 0 deletions app/books/legacy/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const LegacyBookPage = async ({params}: {params: {id: string}}) => {
}

export const generateStaticParams = async (): Promise<Array<{id: string}>> => {
if (process.env.VERCEL_ENV === "preview") return []
const params = await getLegacyBookPaths()
return params.map(item => ({id: item.id.toString()}))
}
Expand Down

0 comments on commit 11f0fa4

Please sign in to comment.