diff options
author | Anton Tananaev <anton@traccar.org> | 2022-06-26 17:24:00 -0700 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2022-06-26 17:24:00 -0700 |
commit | 6c0eece6465ec148ecc5517cfea5522c27a9801f (patch) | |
tree | b509bea3e63847d8b27460f97fca0ea169c93820 /modern/src/other/GeofencesPage.js | |
parent | 6721b7c6c70152fe5c6b19ab38b7a9b9c8357a25 (diff) | |
download | trackermap-web-6c0eece6465ec148ecc5517cfea5522c27a9801f.tar.gz trackermap-web-6c0eece6465ec148ecc5517cfea5522c27a9801f.tar.bz2 trackermap-web-6c0eece6465ec148ecc5517cfea5522c27a9801f.zip |
Implement geofence selection
Diffstat (limited to 'modern/src/other/GeofencesPage.js')
-rw-r--r-- | modern/src/other/GeofencesPage.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/modern/src/other/GeofencesPage.js b/modern/src/other/GeofencesPage.js index 8af8a711..59dcdc4e 100644 --- a/modern/src/other/GeofencesPage.js +++ b/modern/src/other/GeofencesPage.js @@ -1,4 +1,4 @@ -import React from 'react'; +import React, { useState } from 'react'; import { useDispatch } from 'react-redux'; import { Divider, Typography, IconButton, useMediaQuery, Toolbar, @@ -62,6 +62,8 @@ const GeofencesPage = () => { const isPhone = useMediaQuery(theme.breakpoints.down('sm')); + const [selectedGeofenceId, setSelectedGeofenceId] = useState(); + const handleFile = (event) => { const files = Array.from(event.target.files); const [file] = files; @@ -117,11 +119,11 @@ const GeofencesPage = () => { </label> </Toolbar> <Divider /> - <GeofencesList /> + <GeofencesList onGeofenceSelected={setSelectedGeofenceId} /> </Drawer> <div className={classes.mapContainer}> <MapView> - <MapGeofenceEdit /> + <MapGeofenceEdit selectedGeofenceId={selectedGeofenceId} /> </MapView> <MapCurrentLocation /> <MapGeocoder /> |