mirror of
https://github.com/temetro/temetro.git
synced 2026-07-26 11:58:14 +00:00
Suppress body hydration warning from browser-extension attributes
Extensions like ColorZilla inject attributes (cz-shortcut-listen) into <body> before React hydrates, causing a benign hydration mismatch. suppressHydrationWarning on <body> is the standard fix; it only ignores attribute diffs on <body> itself, not its children. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -31,7 +31,15 @@ export default function RootLayout({
|
||||
lang="en"
|
||||
className={cn("dark", "h-full", "antialiased", geistSans.variable, geistMono.variable, "font-sans", inter.variable)}
|
||||
>
|
||||
<body className="h-dvh overflow-hidden flex flex-col">{children}</body>
|
||||
{/* suppressHydrationWarning: browser extensions (e.g. ColorZilla's
|
||||
cz-shortcut-listen) mutate <body> before hydration. Only ignores
|
||||
attribute diffs on <body> itself, not its children. */}
|
||||
<body
|
||||
className="h-dvh overflow-hidden flex flex-col"
|
||||
suppressHydrationWarning
|
||||
>
|
||||
{children}
|
||||
</body>
|
||||
</html>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user