fix: add page reload back to apply theme changes
This commit is contained in:
1 parent
c18a3268fc
commit
a6fcf0eb7b
2 files changed
+9
-18
No files matched your search
+5
-1
@@ -62,7 +62,11 @@ export default function RootLayout({
|
||||
html.classList.remove('dark');
|
||||
} else if (theme === 'system') {
|
||||
const isDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
|
||||
if (isDark) html.classList.add('dark');
|
||||
if (isDark) {
|
||||
html.classList.add('dark');
|
||||
} else {
|
||||
html.classList.remove('dark');
|
||||
}
|
||||
}
|
||||
})();
|
||||
`
|
||||
|
||||
Reference in new issue
Block a user