From 0510fac36d0d852984b567104e2c9f0df9906492 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sun, 23 Oct 2022 06:36:50 -0700 Subject: Simplify device list data --- modern/src/main/DeviceList.js | 2 +- modern/src/main/DeviceRow.js | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'modern/src') 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); -- cgit v1.2.3