mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 22:16:40 +00:00
feat(idontknowwhatthisis)
This commit is contained in:
1 parent
3e03993d5b
commit
14223c9800
2 files changed
+8
-3
No files matched your search
@@ -1,4 +1,4 @@
|
|||||||
import React, { useState } from 'react';
|
import React, { useEffect, useState } from 'react';
|
||||||
import { AppWrapper } from '../../../ui/components';
|
import { AppWrapper } from '../../../ui/components';
|
||||||
import { AppTitle } from '../../../ui/components/AppTitle';
|
import { AppTitle } from '../../../ui/components/AppTitle';
|
||||||
import { AppContent } from '../../../ui/components/AppContent';
|
import { AppContent } from '../../../ui/components/AppContent';
|
||||||
@@ -36,9 +36,14 @@ export const SettingsApp = () => {
|
|||||||
const settingsApp = useApp('SETTINGS');
|
const settingsApp = useApp('SETTINGS');
|
||||||
const [config] = useConfig();
|
const [config] = useConfig();
|
||||||
const { setSettings, settings } = useSettings();
|
const { setSettings, settings } = useSettings();
|
||||||
const [, setVal, getStorageItem] = useLocalStorage();
|
const [localVal, setVal, getStorageItem] = useLocalStorage();
|
||||||
const simcard = useSimcard();
|
const simcard = useSimcard();
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
console.log('new localstorage');
|
||||||
|
// this will be used to trigger a alert that gives feedback when the a setting is changed
|
||||||
|
}, [localVal]);
|
||||||
|
|
||||||
const wallpapers = config.wallpapers.map(
|
const wallpapers = config.wallpapers.map(
|
||||||
MapStringOptions(getStorageItem('wallpaper'), (val: string) =>
|
MapStringOptions(getStorageItem('wallpaper'), (val: string) =>
|
||||||
setVal('wallpaper', val)
|
setVal('wallpaper', val)
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ const configState = atom({
|
|||||||
|
|
||||||
export const useConfig = (state: any = configState): any => {
|
export const useConfig = (state: any = configState): any => {
|
||||||
const [, setVal] = useLocalStorage();
|
const [, setVal] = useLocalStorage();
|
||||||
const [config, _setConfig] = useRecoilState(state);
|
const [config] = useRecoilState(state);
|
||||||
|
|
||||||
const setConfig = (key, value) => {
|
const setConfig = (key, value) => {
|
||||||
console.log(`setConfig: ${key} ${value}`);
|
console.log(`setConfig: ${key} ${value}`);
|
||||||
|
|||||||
Reference in new issue
Block a user