Fix: SettingItem with no onClick

This commit is contained in:
Taso committed 2021-01-13 16:49:30 -05:00
1 parent a29ba86577
commit 7b9d8826a6
1 file changed
+11
@@ -24,6 +24,17 @@ export const SettingItem = ({
icon,
disabled,
}: IProps) => {
if (!onClick)
return (
<>
<ListItem button>
<ListItemIcon>{icon}</ListItemIcon>
<ListItemText primary={label} secondary={value ? value : undefined} />
</ListItem>
<Divider />
</>
);
return (
<>
<ListItem onClick={() => onClick(options)} button>