Skip to content

Commit 3658b3f

Browse files
committed
Fix theming class hydration warning on html element (#5233)
This is the correct way to fix this https://github.com/pacocoursey/next-themes?tab=readme-ov-file#with-app ` suppressHydrationWarning` property only applies one level deep, so it won't block hydration warnings on other child elements of `<html>`
1 parent 686d0c3 commit 3658b3f

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

apps/dashboard/src/app/global-error.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export default function GlobalError({
2727
}, [error]);
2828

2929
return (
30-
<html lang="en">
30+
<html lang="en" suppressHydrationWarning>
3131
<body>
3232
<h2>Something went wrong!</h2>
3333
<button type="button" onClick={() => reset()}>

apps/dashboard/src/app/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export default function RootLayout({
5555
children: React.ReactNode;
5656
}) {
5757
return (
58-
<html lang="en">
58+
<html lang="en" suppressHydrationWarning>
5959
<head>
6060
<PlausibleProvider
6161
domain="thirdweb.com"

apps/playground-web/src/app/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export default function RootLayout({
3232
children: React.ReactNode;
3333
}) {
3434
return (
35-
<html lang="en">
35+
<html lang="en" suppressHydrationWarning>
3636
<head>
3737
<Script
3838
src="https://thirdweb.com/js/pl.js"

apps/portal/src/app/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export default function RootLayout({
3838
children: React.ReactNode;
3939
}) {
4040
return (
41-
<html lang="en">
41+
<html lang="en" suppressHydrationWarning>
4242
<head>
4343
<PosthogHeadSetup />
4444
<Script

apps/wallet-ui/src/app/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export default function RootLayout({
1111
children: React.ReactNode;
1212
}>) {
1313
return (
14-
<html lang="en">
14+
<html lang="en" suppressHydrationWarning>
1515
<body
1616
className={cn(
1717
"flex min-h-screen w-full max-w-screen justify-center",

0 commit comments

Comments
 (0)