This commit is contained in:
parent
6ed20feda8
commit
f275607a9a
|
|
@ -24,6 +24,17 @@ export default async function Login({
|
||||||
params: { locale: string };
|
params: { locale: string };
|
||||||
}) {
|
}) {
|
||||||
const cookieStore = cookies()
|
const cookieStore = cookies()
|
||||||
|
|
||||||
|
|
||||||
|
// locale 已经是一个字符串,不需要解构
|
||||||
|
const localeString = locale;
|
||||||
|
|
||||||
|
const { t, resources } = await initTranslations(localeString, ['translation']);
|
||||||
|
// 打印翻译内容确认是否正常加载
|
||||||
|
console.log("...............locale: ", {localeString});
|
||||||
|
console.log("Translation for login.email: ", t("login.email"));
|
||||||
|
|
||||||
|
|
||||||
const supabase = createServerClient<Database>(
|
const supabase = createServerClient<Database>(
|
||||||
process.env.NEXT_PUBLIC_SUPABASE_URL!,
|
process.env.NEXT_PUBLIC_SUPABASE_URL!,
|
||||||
process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY!,
|
process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY!,
|
||||||
|
|
@ -167,13 +178,7 @@ export default async function Login({
|
||||||
return redirect("/login?message=Check email to reset password")
|
return redirect("/login?message=Check email to reset password")
|
||||||
}
|
}
|
||||||
|
|
||||||
// locale 已经是一个字符串,不需要解构
|
|
||||||
const localeString = locale;
|
|
||||||
|
|
||||||
const { t, resources } = await initTranslations(localeString, ['translation']);
|
|
||||||
// 打印翻译内容确认是否正常加载
|
|
||||||
console.log("...............locale: ", {localeString});
|
|
||||||
console.log("Translation for login.email: ", t("login.email"));
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex w-full flex-1 flex-col justify-center gap-2 px-8 sm:max-w-md">
|
<div className="flex w-full flex-1 flex-col justify-center gap-2 px-8 sm:max-w-md">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue