diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2020-09-28 20:43:47 -0700 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2020-09-28 20:43:47 -0700 |
commit | 94e8c40f52b239562aded5e70e334ddbb2eea23b (patch) | |
tree | bd5d8b9425a08ac055f0617818e6e54930c4d557 /modern/src/MainMap.js | |
parent | 9d72339c8365da80154f635dc8184b135a53bab0 (diff) | |
download | etbsa-traccar-web-94e8c40f52b239562aded5e70e334ddbb2eea23b.tar.gz etbsa-traccar-web-94e8c40f52b239562aded5e70e334ddbb2eea23b.tar.bz2 etbsa-traccar-web-94e8c40f52b239562aded5e70e334ddbb2eea23b.zip |
Page for all attributes
Diffstat (limited to 'modern/src/MainMap.js')
-rw-r--r-- | modern/src/MainMap.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/modern/src/MainMap.js b/modern/src/MainMap.js index 5ba5098..b3fafb6 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); |