Skip to content

Commit cf39d33

Browse files
authored
Merge pull request #15602 from ethereum/fix-static-params
Fix generateStaticParams
2 parents 4634b65 + ec14c7c commit cf39d33

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

app/[locale]/page.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ import {
2323
BLOG_FEEDS,
2424
BLOGS_WITHOUT_FEED,
2525
CALENDAR_DISPLAY_COUNT,
26-
LOCALES_CODES,
2726
RSS_DISPLAY_COUNT,
2827
} from "@/lib/constants"
2928

3029
import HomePage from "./_components/home"
3130

31+
import { routing } from "@/i18n/routing"
3232
import { fetchCommunityEvents } from "@/lib/api/calendarEvents"
3333
import { fetchEthPrice } from "@/lib/api/fetchEthPrice"
3434
import { fetchGrowThePie } from "@/lib/api/fetchGrowThePie"
@@ -129,7 +129,11 @@ const Page = async ({ params }: { params: Promise<{ locale: Lang }> }) => {
129129
)
130130
}
131131

132-
export const generateStaticParams = async () => LOCALES_CODES
132+
export async function generateStaticParams() {
133+
return routing.locales.map((locale) => ({
134+
locale,
135+
}))
136+
}
133137

134138
export async function generateMetadata({
135139
params,

0 commit comments

Comments
 (0)