fix(ui): 在根 HTML 标签添加 suppressHydrationWarning 修复主题水合报错

This commit is contained in:
kennethcheng 2026-04-27 21:16:56 +08:00
parent 0e9a5fc12f
commit f160c2bdcb

View File

@ -24,7 +24,7 @@ export default function RootLayout({
children: React.ReactNode; children: React.ReactNode;
}>) { }>) {
return ( return (
<html lang="en" className={`${geistSans.variable} ${geistMono.variable}`}> <html lang="zh-CN" suppressHydrationWarning className={`${geistSans.variable} ${geistMono.variable}`}>
<body> <body>
<ThemeProvider attribute="class" defaultTheme="system" enableSystem disableTransitionOnChange> <ThemeProvider attribute="class" defaultTheme="system" enableSystem disableTransitionOnChange>
{children} {children}