feat(localstorage): resolved issue with phone not re-rendering

This commit is contained in:
Christopher committed 2021-01-04 20:33:53 +01:00
1 parent 14223c9800
commit dddddc01f8
5 files changed
+19 -6

No files matched your search

@@ -6,6 +6,7 @@ import {
ListItemIcon,
} from '@material-ui/core';
import { SvgIconProps } from '@material-ui/core';
interface IProps {
options?: any;
label: string;
@@ -35,15 +35,9 @@ const SubHeaderComp = (props: { text: string }) => (
export const SettingsApp = () => {
const settingsApp = useApp('SETTINGS');
const [config] = useConfig();
const { setSettings, settings } = useSettings();
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)
@@ -77,6 +71,10 @@ export const SettingsApp = () => {
// TODO: These new settings all work
useEffect(() => {
// this will be used to trigger a alert that gives feedback when the a setting is changed
}, [setVal]);
const [openMenu, closeMenu, ContextMenu, isMenuOpen] = useContextMenu();
return (
<AppWrapper>