mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 22:16:40 +00:00
Feat: Settings localStorage state
This commit is contained in:
commit
73a5bab1c7
15 files changed
+120
-122
No files matched your search
@@ -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"],
|
||||
|
||||
@@ -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];
|
||||
|
||||
Reference in new issue
Block a user