aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-10-23 06:36:50 -0700
committerAnton Tananaev <anton@traccar.org>2022-10-23 06:36:50 -0700
commit0510fac36d0d852984b567104e2c9f0df9906492 (patch)
treeb5e982212cf4a1ad0c54a6bf7c462b3c7446791b
parent23f2332c7ce6cea72d91df102d35c03d0d3ce49e (diff)
downloadtrackermap-web-0510fac36d0d852984b567104e2c9f0df9906492.tar.gz
trackermap-web-0510fac36d0d852984b567104e2c9f0df9906492.tar.bz2
trackermap-web-0510fac36d0d852984b567104e2c9f0df9906492.zip
Simplify device list data
-rw-r--r--modern/src/main/DeviceList.js2
-rw-r--r--modern/src/main/DeviceRow.js3
2 files changed, 2 insertions, 3 deletions
diff --git a/modern/src/main/DeviceList.js b/modern/src/main/DeviceList.js
index 80104b00..6672ac46 100644
--- a/modern/src/main/DeviceList.js
+++ b/modern/src/main/DeviceList.js
@@ -53,7 +53,7 @@ const DeviceList = ({ devices }) => {
width={width}
height={height}
itemCount={devices.length}
- itemData={{ items: devices }}
+ itemData={devices}
itemSize={72}
overscanCount={10}
innerRef={listInnerEl}
diff --git a/modern/src/main/DeviceRow.js b/modern/src/main/DeviceRow.js
index 440e6f5c..978813b4 100644
--- a/modern/src/main/DeviceRow.js
+++ b/modern/src/main/DeviceRow.js
@@ -60,8 +60,7 @@ const DeviceRow = ({ data, index, style }) => {
const admin = useAdministrator();
- const { items } = data;
- const item = items[index];
+ const item = data[index];
const position = useSelector((state) => state.positions.items[item.id]);
const geofences = useSelector((state) => state.geofences.items);