Set dark mode to default regardless of user browser settings

This commit is contained in:
2025-11-17 13:24:14 +01:00
parent 65adbf1aaa
commit a120e30e03

View File

@@ -32,7 +32,8 @@
const getTheme = () => {
const storedTheme = localStorage.getItem('theme');
if (storedTheme) return storedTheme;
return window.matchMedia('(prefers-color-scheme: light)').matches ? 'light' : 'dark';
// For new visitors, default to dark mode regardless of their OS setting.
return 'dark';
};
const setTheme = (theme) => {