diff options
author | Anton Tananaev <anton@traccar.org> | 2023-04-23 08:28:57 -0700 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2023-04-23 08:28:57 -0700 |
commit | 70d15a4ecd73c894c462a7dd70c79d4a99e113d6 (patch) | |
tree | f864b5906ca7d0a04403b69fe07e4ec6b4569a21 /modern/src/common/components/GeofencesValue.js | |
parent | c52e68dfd8faa227d7d4e756004e243b6aebf414 (diff) | |
download | trackermap-web-70d15a4ecd73c894c462a7dd70c79d4a99e113d6.tar.gz trackermap-web-70d15a4ecd73c894c462a7dd70c79d4a99e113d6.tar.bz2 trackermap-web-70d15a4ecd73c894c462a7dd70c79d4a99e113d6.zip |
Geofences position attribute
Diffstat (limited to 'modern/src/common/components/GeofencesValue.js')
-rw-r--r-- | modern/src/common/components/GeofencesValue.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/modern/src/common/components/GeofencesValue.js b/modern/src/common/components/GeofencesValue.js new file mode 100644 index 00000000..4808a8a2 --- /dev/null +++ b/modern/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; |