aboutsummaryrefslogtreecommitdiff
path: root/modern/src/MainMap.js
diff options
context:
space:
mode:
Diffstat (limited to 'modern/src/MainMap.js')
-rw-r--r--modern/src/MainMap.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/modern/src/MainMap.js b/modern/src/MainMap.js
index 5ba50982..b3fafb6a 100644
--- a/modern/src/MainMap.js
+++ b/modern/src/MainMap.js
@@ -6,8 +6,11 @@ import mapboxgl from 'mapbox-gl';
import mapManager from './mapManager';
import store from './store';
import StatusView from './StatusView';
+import { useHistory } from 'react-router-dom';
const MainMap = () => {
+ const history = useHistory();
+
const containerEl = useRef(null);
const [mapReady, setMapReady] = useState(false);
@@ -67,7 +70,7 @@ const MainMap = () => {
const placeholder = document.createElement('div');
ReactDOM.render(
<Provider store={store}>
- <StatusView deviceId={feature.properties.deviceId} />
+ <StatusView deviceId={feature.properties.deviceId} onShowDetails={positionId => history.push(`/position/${positionId}`)} />
</Provider>,
placeholder);