feat(idontknowwhatthisis)

This commit is contained in:
Christopher committed 2020-12-14 20:27:59 +01:00
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 { AppTitle } from '../../../ui/components/AppTitle';
import { AppContent } from '../../../ui/components/AppContent';
@@ -36,9 +36,14 @@ export const SettingsApp = () => {
const settingsApp = useApp('SETTINGS');
const [config] = useConfig();
const { setSettings, settings } = useSettings();
const [, setVal, getStorageItem] = useLocalStorage();
const [localVal, setVal, getStorageItem] = useLocalStorage();
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(
MapStringOptions(getStorageItem('wallpaper'), (val: string) =>
setVal('wallpaper', val)
+1 -1
View File
@@ -9,7 +9,7 @@ const configState = atom({
export const useConfig = (state: any = configState): any => {
const [, setVal] = useLocalStorage();
const [config, _setConfig] = useRecoilState(state);
const [config] = useRecoilState(state);
const setConfig = (key, value) => {
console.log(`setConfig: ${key} ${value}`);