mirror of
https://github.com/snowykami/neo-blog.git
synced 2025-09-26 11:06:23 +00:00
fix: Closes #5 修复首选语言检测错误的问题
This commit is contained in:
@ -4,7 +4,7 @@ import "./globals.css";
|
||||
import { DeviceProvider } from "@/contexts/device-context";
|
||||
import { NextIntlClientProvider } from 'next-intl';
|
||||
import config from "@/config";
|
||||
import { getUserLocales } from "@/i18n/request";
|
||||
import { getUserLocales, getFirstLocale } from '@/i18n/request';
|
||||
import { Toaster } from "@/components/ui/sonner"
|
||||
|
||||
const geistSans = Geist({
|
||||
@ -28,7 +28,7 @@ export default async function RootLayout({
|
||||
children: React.ReactNode;
|
||||
}>) {
|
||||
return (
|
||||
<html lang={(await getUserLocales())[0] || "en"} className="h-full">
|
||||
<html lang={await getFirstLocale() || "en"} className="h-full">
|
||||
<body
|
||||
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
|
||||
>
|
||||
|
Reference in New Issue
Block a user