mirror of
https://github.com/urbit/shrub.git
synced 2024-12-01 06:35:32 +03:00
theme: matching setting value to current imp
This commit is contained in:
parent
8027ab9d50
commit
78e623c019
@ -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 {
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user