diff options
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.js | 17 |
1 files changed, 17 insertions, 0 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 new file mode 100644 index 00000000..de43a151 --- /dev/null +++ b/opendc-web/opendc-web-ui/src/containers/app/map/TopologyContainer.js @@ -0,0 +1,17 @@ +import { connect } from 'react-redux' +import TopologyGroup from '../../../components/app/map/groups/TopologyGroup' + +const mapStateToProps = (state) => { + if (state.currentTopologyId === '-1') { + return {} + } + + return { + topology: state.objects.topology[state.currentTopologyId], + interactionLevel: state.interactionLevel, + } +} + +const TopologyContainer = connect(mapStateToProps)(TopologyGroup) + +export default TopologyContainer |
