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
@@ -8,12 +8,15 @@ const configState = atom({
|
||||
});
|
||||
|
||||
export const useConfig = (state: any = configState): any => {
|
||||
const [, setVal] = useLocalStorage();
|
||||
const [config] = useRecoilState(state);
|
||||
const [, setVal] = useLocalStorage('');
|
||||
const [config, _setConfig] = useRecoilState(state);
|
||||
|
||||
const setConfig = (key, value) => {
|
||||
console.log(`setConfig: ${key} ${value}`);
|
||||
setVal(key, value);
|
||||
_setConfig((oldConfig) => ({
|
||||
...oldConfig,
|
||||
[key]: value,
|
||||
}));
|
||||
//setVal(key, value);
|
||||
};
|
||||
|
||||
return [config, setConfig];
|
||||
|
||||
Reference in new issue
Block a user