fix(theme): unblock light mode in dev
Hardcoded class="dark" on <html> meant React owned it via JSX. HMR re-renders and reconciliation kept restoring the class after classList.toggle removed it, so light toggle never stuck. ThemeScript already handles initial paint; suppressHydrationWarning covers the post-script class mismatch.
This commit is contained in:
@@ -24,7 +24,7 @@ export default function RootLayout({
|
|||||||
children: React.ReactNode;
|
children: React.ReactNode;
|
||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<html lang="en" className="dark">
|
<html lang="en" suppressHydrationWarning>
|
||||||
<head>
|
<head>
|
||||||
<ThemeScript />
|
<ThemeScript />
|
||||||
</head>
|
</head>
|
||||||
|
|||||||
Reference in New Issue
Block a user