From 8bf5fd13490ef4b288315e507d8554d7aa356b23 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sun, 23 Apr 2023 07:57:34 -0700 Subject: Remove geofence ids --- modern/src/main/DeviceRow.js | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'modern/src/main/DeviceRow.js') diff --git a/modern/src/main/DeviceRow.js b/modern/src/main/DeviceRow.js index bf5aec3e..4dac8128 100644 --- a/modern/src/main/DeviceRow.js +++ b/modern/src/main/DeviceRow.js @@ -62,17 +62,6 @@ const DeviceRow = ({ data, index, style }) => { const devicePrimary = useAttributePreference('devicePrimary', 'name'); const deviceSecondary = useAttributePreference('deviceSecondary', ''); - const formatProperty = (key) => { - if (key === 'geofenceIds') { - const geofenceIds = item[key] || []; - return geofenceIds - .filter((id) => geofences.hasOwnProperty(id)) - .map((id) => geofences[id].name) - .join(', '); - } - return item[key]; - }; - const secondaryText = () => { let status; if (item.status === 'online' || !item.lastUpdate) { @@ -82,7 +71,7 @@ const DeviceRow = ({ data, index, style }) => { } return ( <> - {deviceSecondary && item[deviceSecondary] && `${formatProperty(deviceSecondary)} • `} + {deviceSecondary && item[deviceSecondary] && `${item[deviceSecondary]} • `} {status} ); @@ -101,7 +90,7 @@ const DeviceRow = ({ data, index, style }) => {