aboutsummaryrefslogtreecommitdiff
path: root/modern/src/main/DevicesList.js
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-05-22 15:55:45 -0700
committerAnton Tananaev <anton@traccar.org>2022-05-22 15:55:45 -0700
commitdd18f6264b1a5eb006b4b57951176f7da9cf4fe1 (patch)
tree19fc46d444890680eeff40dd1059a9f92c723ebe /modern/src/main/DevicesList.js
parent729c219369e288a60432f0e7722dae36088c0bda (diff)
downloadtrackermap-web-dd18f6264b1a5eb006b4b57951176f7da9cf4fe1.tar.gz
trackermap-web-dd18f6264b1a5eb006b4b57951176f7da9cf4fe1.tar.bz2
trackermap-web-dd18f6264b1a5eb006b4b57951176f7da9cf4fe1.zip
Reorganize collections
Diffstat (limited to 'modern/src/main/DevicesList.js')
-rw-r--r--modern/src/main/DevicesList.js11
1 files changed, 3 insertions, 8 deletions
diff --git a/modern/src/main/DevicesList.js b/modern/src/main/DevicesList.js
index 6ff08c6a..b80eaf8b 100644
--- a/modern/src/main/DevicesList.js
+++ b/modern/src/main/DevicesList.js
@@ -21,7 +21,6 @@ import FlashOffIcon from '@material-ui/icons/FlashOff';
import ErrorIcon from '@material-ui/icons/Error';
import { devicesActions } from '../store';
-import EditCollectionView from '../settings/components/EditCollectionView';
import { useEffectAsync } from '../reactHelper';
import {
formatAlarm, formatBoolean, formatPercentage, formatStatus, getStatusColor,
@@ -139,7 +138,7 @@ const DeviceRow = ({ data, index, style }) => {
);
};
-const DeviceView = ({ updateTimestamp, onMenuClick, filter }) => {
+const DevicesList = ({ filter }) => {
const classes = useStyles();
const dispatch = useDispatch();
const listInnerEl = useRef(null);
@@ -167,7 +166,7 @@ const DeviceView = ({ updateTimestamp, onMenuClick, filter }) => {
} else {
throw Error(await response.text());
}
- }, [updateTimestamp]);
+ }, []);
return (
<AutoSizer className={classes.list}>
@@ -177,7 +176,7 @@ const DeviceView = ({ updateTimestamp, onMenuClick, filter }) => {
width={width}
height={height}
itemCount={filteredItems.length}
- itemData={{ items: filteredItems, onMenuClick }}
+ itemData={{ items: filteredItems }}
itemSize={72}
overscanCount={10}
innerRef={listInnerEl}
@@ -190,8 +189,4 @@ const DeviceView = ({ updateTimestamp, onMenuClick, filter }) => {
);
};
-const DevicesList = ({ filter }) => (
- <EditCollectionView content={DeviceView} editPath="/settings/device" endpoint="devices" disableAdd filter={filter} />
-);
-
export default DevicesList;