aboutsummaryrefslogtreecommitdiff
path: root/modern/src/other/GeofencesPage.js
diff options
context:
space:
mode:
Diffstat (limited to 'modern/src/other/GeofencesPage.js')
-rw-r--r--modern/src/other/GeofencesPage.js8
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 />