enhance(phone/settings): Added labels to settings and misc cleanup

This change alters the default localStorage schema, please clear your localStorage cache for testing
This commit is contained in:
Taso authored and Taso committed 2021-03-04 11:33:25 -05:00
1 parent 5969d33dc3
commit 64c4e0ec16
11 files changed
+290 -210

No files matched your search

+14
View File
@@ -12,6 +12,20 @@ export const MapStringOptions = (current, onClick) => (string) => {
};
};
export interface SettingOption {
label: string;
value: string | number;
}
export const MapSettingItem = (current: SettingOption, onClick: Function) => (
item: SettingOption,
) => ({
selected: current.value === item.value,
onClick: () => onClick(item),
key: item.value,
label: item.label,
});
export const useContextMenu = (_options?): UseContextMenu => {
const [open, setOpen] = useState(false);
const [options, setOptions] = useState(_options || []);