diff options
Diffstat (limited to 'modern/src/other/GeofencesList.js')
-rw-r--r-- | modern/src/other/GeofencesList.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modern/src/other/GeofencesList.js b/modern/src/other/GeofencesList.js index 5463d73a..d26eff09 100644 --- a/modern/src/other/GeofencesList.js +++ b/modern/src/other/GeofencesList.js @@ -5,7 +5,7 @@ import { Divider, List, ListItemButton, ListItemText, } from '@mui/material'; -import { devicesActions, geofencesActions } from '../store'; +import { geofencesActions } from '../store'; import CollectionActions from '../settings/components/CollectionActions'; import { useCatchCallback } from '../reactHelper'; @@ -21,7 +21,7 @@ const useStyles = makeStyles(() => ({ }, })); -const GeofencesList = () => { +const GeofencesList = ({ onGeofenceSelected }) => { const classes = useStyles(); const dispatch = useDispatch(); @@ -40,7 +40,7 @@ const GeofencesList = () => { <List className={classes.list}> {Object.values(items).map((item, index, list) => ( <Fragment key={item.id}> - <ListItemButton key={item.id} onClick={() => dispatch(devicesActions.select(item.id))}> + <ListItemButton key={item.id} onClick={() => onGeofenceSelected(item.id)}> <ListItemText primary={item.name} /> <CollectionActions itemId={item.id} editPath="/settings/geofence" endpoint="geofences" setTimestamp={refreshGeofences} /> </ListItemButton> |