Skip to content

Commit 463cd35

Browse files
committed
Supress hydration warning from next-themes
1 parent 039053f commit 463cd35

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/app/layout.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,12 @@ export default function RootLayout({
2323
children: ReactNode
2424
}): ReactElement {
2525
return (
26-
<html lang="en" className="scroll-smooth">
26+
<html
27+
lang="en"
28+
className="scroll-smooth"
29+
// ThemeProvider adds a `light`/`dark` class
30+
suppressHydrationWarning
31+
>
2732
<head>
2833
<style>{`html { scroll-padding-top: 5rem }`}</style>
2934
</head>

0 commit comments

Comments
 (0)