theme: matching setting value to current imp

This commit is contained in:
Hunter Miller 2021-09-14 16:32:27 -05:00
parent 8027ab9d50
commit 78e623c019
2 changed files with 3 additions and 3 deletions

View File

@ -17,7 +17,7 @@ const AppRoutes = () => {
const updateThemeClass = useCallback(
(e: MediaQueryListEvent) => {
if ((e.matches && theme === 'automatic') || theme === 'dark') {
if ((e.matches && theme === 'auto') || theme === 'dark') {
document.body.classList.add('dark');
useLocalState.setState({ currentTheme: 'dark' });
} else {

View File

@ -18,7 +18,7 @@ import api from './api';
interface BaseSettingsState {
display: {
theme: 'light' | 'dark' | 'automatic';
theme: 'light' | 'dark' | 'auto';
doNotDisturb: boolean;
};
putEntry: (bucket: string, key: string, value: Value) => Promise<void>;
@ -68,7 +68,7 @@ export const useSettingsState = createState<BaseSettingsState>(
'Settings',
(set, get) => ({
display: {
theme: 'automatic',
theme: 'auto',
doNotDisturb: true
},
loaded: false,