mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 14:38:45 +00:00
minor changes in localStorage - nothing to see here
This commit is contained in:
1 parent
dddddc01f8
commit
07dc73f0cb
6 files changed
+38
-29
No files matched your search
@@ -3,6 +3,7 @@ import { useConfig } from '../../../config/hooks/useConfig';
|
||||
import { atom } from 'recoil';
|
||||
import { createMuiTheme } from '@material-ui/core';
|
||||
import useLocalStorage from '../../../os/phone/hooks/useLocalStorage';
|
||||
import { getStorageItem } from '../../../os/phone/hooks/getLocalStorage';
|
||||
|
||||
const settingsState = atom({
|
||||
key: 'settings',
|
||||
@@ -10,10 +11,9 @@ const settingsState = atom({
|
||||
});
|
||||
|
||||
export const useSettings = (): any => {
|
||||
const [, , getStorageItem] = useLocalStorage('theme', 'taso-dark');
|
||||
const theme = getStorageItem('theme');
|
||||
const [settings, setSettings] = useLocalStorage();
|
||||
const [config] = useConfig();
|
||||
const currentTheme = () =>
|
||||
createMuiTheme(config.themes[getStorageItem('theme')]);
|
||||
const currentTheme = () => createMuiTheme(config.themes[theme]);
|
||||
return { settings, setSettings, currentTheme };
|
||||
};
|
||||
Reference in new issue
Block a user