aboutsummaryrefslogtreecommitdiff
path: root/modern/src/other
diff options
context:
space:
mode:
Diffstat (limited to 'modern/src/other')
-rw-r--r--modern/src/other/GeofencesList.js17
1 files changed, 3 insertions, 14 deletions
diff --git a/modern/src/other/GeofencesList.js b/modern/src/other/GeofencesList.js
index d0d0853f..202ae3b1 100644
--- a/modern/src/other/GeofencesList.js
+++ b/modern/src/other/GeofencesList.js
@@ -2,15 +2,12 @@ import React, { Fragment } from 'react';
import { useDispatch, useSelector } from 'react-redux';
import { makeStyles } from '@material-ui/core/styles';
import Divider from '@material-ui/core/Divider';
-import IconButton from '@material-ui/core/IconButton';
import List from '@material-ui/core/List';
import ListItem from '@material-ui/core/ListItem';
-import ListItemSecondaryAction from '@material-ui/core/ListItemSecondaryAction';
import ListItemText from '@material-ui/core/ListItemText';
-import MoreVertIcon from '@material-ui/icons/MoreVert';
import { devicesActions } from '../store';
-import EditCollectionView from '../settings/components/EditCollectionView';
+import CollectionActions from '../settings/components/CollectionActions';
const useStyles = makeStyles(() => ({
list: {
@@ -24,7 +21,7 @@ const useStyles = makeStyles(() => ({
},
}));
-const GeofenceView = ({ onMenuClick }) => {
+const GeofencesList = () => {
const classes = useStyles();
const dispatch = useDispatch();
@@ -36,11 +33,7 @@ const GeofenceView = ({ onMenuClick }) => {
<Fragment key={item.id}>
<ListItem button key={item.id} onClick={() => dispatch(devicesActions.select(item.id))}>
<ListItemText primary={item.name} />
- <ListItemSecondaryAction>
- <IconButton size="small" onClick={(event) => onMenuClick(event.currentTarget, item.id)}>
- <MoreVertIcon />
- </IconButton>
- </ListItemSecondaryAction>
+ <CollectionActions itemId={item.id} editPath="/settings/geofence" endpoint="geofences" />
</ListItem>
{index < list.length - 1 ? <Divider /> : null}
</Fragment>
@@ -49,8 +42,4 @@ const GeofenceView = ({ onMenuClick }) => {
);
};
-const GeofencesList = () => (
- <EditCollectionView content={GeofenceView} editPath="/settings/geofence" endpoint="geofences" disableAdd />
-);
-
export default GeofencesList;