Skip to content

Commit d00e3c4

Browse files
committed
add generateStaticParams function to support static generation
1 parent 3610972 commit d00e3c4

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

app/[locale]/layer-2/page.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import { BASE_TIME_UNIT } from "@/lib/constants"
2020

2121
import Layer2Page from "./_components/layer-2"
2222

23+
import { routing } from "@/i18n/routing"
2324
import { fetchGrowThePie } from "@/lib/api/fetchGrowThePie"
2425
import { fetchL2beat } from "@/lib/api/fetchL2beat"
2526

@@ -79,6 +80,14 @@ const Page = async ({ params }: { params: Promise<{ locale: Lang }> }) => {
7980
)
8081
}
8182

83+
export async function generateStaticParams() {
84+
return routing.locales.map((locale) => ({
85+
locale,
86+
}))
87+
}
88+
89+
export const dynamicParams = false
90+
8291
export async function generateMetadata({
8392
params,
8493
}: {

0 commit comments

Comments
 (0)