chore: set light theme as default
This commit is contained in:
parent
d55a91d2b8
commit
a0a2a6fe97
|
|
@ -9,11 +9,9 @@ const readStoredTheme = (): Theme => {
|
||||||
const saved = localStorage.getItem(STORAGE_KEY);
|
const saved = localStorage.getItem(STORAGE_KEY);
|
||||||
if (saved === 'light' || saved === 'dark') return saved;
|
if (saved === 'light' || saved === 'dark') return saved;
|
||||||
} catch {
|
} catch {
|
||||||
// Private mode / blocked storage — fall through to the system preference.
|
// Private mode / blocked storage — fall through to default.
|
||||||
}
|
}
|
||||||
return window.matchMedia('(prefers-color-scheme: dark)').matches
|
return 'light';
|
||||||
? 'dark'
|
|
||||||
: 'light';
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const applyTheme = (theme: Theme) => {
|
const applyTheme = (theme: Theme) => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue