Skip to content

Commit 3e78fb3

Browse files
committed
feat(website): add missing generateStaticParams
1 parent 4c0e4e0 commit 3e78fb3

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

apps/website/src/app/[locale]/layout.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import type { FC, PropsWithChildren } from 'react';
22

3+
export { generateStaticParams } from 'next-intlayer';
34
export { generateMetadata } from './metadata';
45

56
export const dynamic = 'force-static';

examples/nextjs-15-app/src/app/[locale]/layout.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import type { Metadata } from 'next';
55
import type { LocalPromiseParams, NextLayoutIntlayer } from 'next-intlayer';
66
import localFont from 'next/font/local';
77

8+
export { generateStaticParams } from 'next-intlayer';
9+
810
const geistSans = localFont({
911
src: '../fonts/GeistVF.woff',
1012
variable: '--font-geist-sans',
@@ -41,14 +43,15 @@ export const generateMetadata = async ({
4143
description,
4244
};
4345
};
46+
export const dynamic = 'force-static';
4447

4548
const LocaleLayout: NextLayoutIntlayer = async ({ children, params }) => {
4649
const { locale } = await params;
4750

4851
return (
4952
<IntlayerProvider locale={locale}>
5053
<html lang={locale} dir={getHTMLTextDir(locale)}>
51-
<header className="fixed top-5 w-full flex justify-end px-10">
54+
<header className="fixed top-5 flex w-full justify-end px-10">
5255
<LocaleSwitcher />
5356
</header>
5457
<body

0 commit comments

Comments
 (0)