summaryrefslogtreecommitdiff
path: root/opendc-web/opendc-web-ui/src/containers/app/map/TopologyContainer.js
diff options
context:
space:
mode:
Diffstat (limited to 'opendc-web/opendc-web-ui/src/containers/app/map/TopologyContainer.js')
-rw-r--r--opendc-web/opendc-web-ui/src/containers/app/map/TopologyContainer.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/opendc-web/opendc-web-ui/src/containers/app/map/TopologyContainer.js b/opendc-web/opendc-web-ui/src/containers/app/map/TopologyContainer.js
index 612ca41c..e7ab3c72 100644
--- a/opendc-web/opendc-web-ui/src/containers/app/map/TopologyContainer.js
+++ b/opendc-web/opendc-web-ui/src/containers/app/map/TopologyContainer.js
@@ -1,11 +1,10 @@
import React from 'react'
import { useSelector } from 'react-redux'
import TopologyGroup from '../../../components/app/map/groups/TopologyGroup'
+import { useActiveTopology } from '../../../data/topology'
const TopologyContainer = () => {
- const topology = useSelector(
- (state) => state.currentTopologyId !== '-1' && state.objects.topology[state.currentTopologyId]
- )
+ const topology = useActiveTopology()
const interactionLevel = useSelector((state) => state.interactionLevel)
return <TopologyGroup topology={topology} interactionLevel={interactionLevel} />