Add i18n support with Next.js App Router and Dictionaries
This commit is contained in:
13
app/[lang]/login/page.tsx
Normal file
13
app/[lang]/login/page.tsx
Normal file
@@ -0,0 +1,13 @@
|
||||
import { getDictionary, Locale } from "@/app/dictionaries";
|
||||
import LoginForm from "./LoginForm";
|
||||
|
||||
export default async function LoginPage(
|
||||
props: {
|
||||
params: Promise<{ lang: string }>;
|
||||
}
|
||||
) {
|
||||
const params = await props.params;
|
||||
|
||||
const dict = await getDictionary(params.lang as Locale);
|
||||
return <LoginForm dict={dict.login} lang={params.lang} />;
|
||||
}
|
||||
Reference in New Issue
Block a user