This commit is contained in:
parent
a1ec617c9d
commit
60ca9d8bd3
|
|
@ -25,9 +25,8 @@ export default async function Login({
|
||||||
}) {
|
}) {
|
||||||
const cookieStore = cookies()
|
const cookieStore = cookies()
|
||||||
|
|
||||||
|
// 优先从 cookie 获取 locale,否则使用 URL 参数中的 locale
|
||||||
// locale 已经是一个字符串,不需要解构
|
const localeString = cookieStore.get('locale')?.value || locale;
|
||||||
const localeString = locale;
|
|
||||||
|
|
||||||
const { t, resources } = await initTranslations(localeString, ['translation']);
|
const { t, resources } = await initTranslations(localeString, ['translation']);
|
||||||
// 打印翻译内容确认是否正常加载
|
// 打印翻译内容确认是否正常加载
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue