aboutsummaryrefslogtreecommitdiff
path: root/src/common/components/GeofencesValue.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/components/GeofencesValue.js')
-rw-r--r--src/common/components/GeofencesValue.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/common/components/GeofencesValue.js b/src/common/components/GeofencesValue.js
new file mode 100644
index 00000000..4808a8a2
--- /dev/null
+++ b/src/common/components/GeofencesValue.js
@@ -0,0 +1,9 @@
+import { useSelector } from 'react-redux';
+
+const GeofencesValue = ({ geofenceIds }) => {
+ const geofences = useSelector((state) => state.geofences.items);
+
+ return geofenceIds.map((id) => geofences[id]?.name).join(', ');
+};
+
+export default GeofencesValue;