Feat: Settings localStorage state

This commit is contained in:
Taso committed 2021-01-12 12:04:46 -05:00
commit 73a5bab1c7
15 files changed
+120 -122

No files matched your search

+8
View File
@@ -10,6 +10,14 @@
"surf.jpg",
"beach.jpg"
],
"defaultSettings": {
"wallpaper": "default.png",
"frame": "s10.png",
"theme": "taso-dark",
"zoom": "100%",
"ringtone": "pixel",
"ringtoneVol": 100
},
"frames": ["default.png", "s10.png", "tw.png", "samsung.png"],
"zoomOptions": ["120%", "100%", "80%", "60%", "40%"],
"ringtones": ["marimba", "pixel"],
+4 -3
View File
@@ -1,8 +1,8 @@
import Default from "../default.json";
import { atom, useRecoilState } from "recoil";
import Default from '../default.json';
import { atom, useRecoilState } from 'recoil';
const configState = atom({
key: "config",
key: 'config',
default: Default,
});
@@ -14,6 +14,7 @@ export const useConfig = (state: any = configState): any => {
...oldConfig,
[key]: value,
}));
//setVal(key, value);
};
return [config, setConfig];