fix: suppress hydration warning on html for theme-init class
CI / check (push) Successful in 25s
CI / release (push) Skipped
CI / deploy (push) Successful in 1m6s

theme-init.js adds the 'dark' class to <html> before React hydrates,
causing a hydration mismatch (React #418) for users with a saved dark
theme. Mark the root element with suppressHydrationWarning.
This commit is contained in:
openhands committed 2026-08-03 18:29:22 +02:00
1 parent 30ed2b8ce2
commit 450e7e8d00
1 file changed
+1 -1
+1 -1
View File
@@ -52,7 +52,7 @@ export default async function RootLayout({
const nonce = (await headers()).get("x-nonce") ?? undefined;
return (
<html lang={locale} className="app">
<html lang={locale} className="app" suppressHydrationWarning>
<head>
<meta name="theme-default-dark" content={String(defaultDark)} />
<link rel="preconnect" href="https://fonts.googleapis.com" />