aboutsummaryrefslogtreecommitdiff
path: root/modern/src/MainMap.js
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2020-09-28 20:43:47 -0700
committerAnton Tananaev <anton.tananaev@gmail.com>2020-09-28 20:43:47 -0700
commit94e8c40f52b239562aded5e70e334ddbb2eea23b (patch)
treebd5d8b9425a08ac055f0617818e6e54930c4d557 /modern/src/MainMap.js
parent9d72339c8365da80154f635dc8184b135a53bab0 (diff)
downloadtrackermap-web-94e8c40f52b239562aded5e70e334ddbb2eea23b.tar.gz
trackermap-web-94e8c40f52b239562aded5e70e334ddbb2eea23b.tar.bz2
trackermap-web-94e8c40f52b239562aded5e70e334ddbb2eea23b.zip
Page for all attributes
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);