mirror of
https://github.com/tloncorp/landscape.git
synced 2024-12-01 02:45:49 +03:00
settings: set display
This commit is contained in:
parent
436f4db6b6
commit
50ed84ca97
@ -41,12 +41,14 @@ const RadioOption = ({ value, label, selected }: RadioOptionProps) => (
|
||||
|
||||
export const AppearancePrefs = () => {
|
||||
const theme = useTheme();
|
||||
const state = useSettingsState.getState();
|
||||
const [pref, setPref] = useState<prefType>(theme || 'auto');
|
||||
|
||||
useEffect(() => {
|
||||
useSettingsState.getState().set((draft) => {
|
||||
draft.display.theme = pref;
|
||||
});
|
||||
state.putEntry('display', 'theme', pref);
|
||||
}, [pref]);
|
||||
|
||||
const handleChange = (value: string) => {
|
||||
|
Loading…
Reference in New Issue
Block a user