From 94e8c40f52b239562aded5e70e334ddbb2eea23b Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Mon, 28 Sep 2020 20:43:47 -0700 Subject: Page for all attributes --- modern/src/MainMap.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'modern/src/MainMap.js') 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( - + history.push(`/position/${positionId}`)} /> , placeholder); -- cgit v1.2.3