aboutsummaryrefslogtreecommitdiff
path: root/modern/src/other/GeofencesList.js
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-06-22 09:10:05 -0700
committerAnton Tananaev <anton@traccar.org>2022-06-22 09:10:05 -0700
commitadca1297c6eebefdcdb6a5be25adc2f2b9d15559 (patch)
tree85408a68b4e236bab1d961641200c977ef64a514 /modern/src/other/GeofencesList.js
parent50a97b2ec3a3a22955cae8bfd6a766b3abb2cf27 (diff)
downloadtrackermap-web-adca1297c6eebefdcdb6a5be25adc2f2b9d15559.tar.gz
trackermap-web-adca1297c6eebefdcdb6a5be25adc2f2b9d15559.tar.bz2
trackermap-web-adca1297c6eebefdcdb6a5be25adc2f2b9d15559.zip
List items and disabled device
Diffstat (limited to 'modern/src/other/GeofencesList.js')
-rw-r--r--modern/src/other/GeofencesList.js11
1 files changed, 5 insertions, 6 deletions
diff --git a/modern/src/other/GeofencesList.js b/modern/src/other/GeofencesList.js
index 7521de80..88db0654 100644
--- a/modern/src/other/GeofencesList.js
+++ b/modern/src/other/GeofencesList.js
@@ -1,10 +1,9 @@
import React, { Fragment } from 'react';
import { useDispatch, useSelector } from 'react-redux';
import makeStyles from '@mui/styles/makeStyles';
-import Divider from '@mui/material/Divider';
-import List from '@mui/material/List';
-import ListItem from '@mui/material/ListItem';
-import ListItemText from '@mui/material/ListItemText';
+import {
+ Divider, List, ListItemButton, ListItemText,
+} from '@mui/material';
import { devicesActions, geofencesActions } from '../store';
import CollectionActions from '../settings/components/CollectionActions';
@@ -41,10 +40,10 @@ const GeofencesList = () => {
<List className={classes.list}>
{Object.values(items).map((item, index, list) => (
<Fragment key={item.id}>
- <ListItem button key={item.id} onClick={() => dispatch(devicesActions.select(item.id))}>
+ <ListItemButton button key={item.id} onClick={() => dispatch(devicesActions.select(item.id))}>
<ListItemText primary={item.name} />
<CollectionActions itemId={item.id} editPath="/settings/geofence" endpoint="geofences" setTimestamp={refreshGeofences} />
- </ListItem>
+ </ListItemButton>
{index < list.length - 1 ? <Divider /> : null}
</Fragment>
))}