summaryrefslogtreecommitdiff
path: root/src/containers/sidebars/topology/rack/EmptySlotContainer.js
diff options
context:
space:
mode:
authorGeorgios Andreadis <g.andreadis@student.tudelft.nl>2017-09-21 16:07:12 +0200
committerGeorgios Andreadis <g.andreadis@student.tudelft.nl>2017-09-23 10:06:05 +0200
commit19f1e6db285d0bb8a96d2cea9c7f3a543692b81a (patch)
tree6c4aeea3bd174c4675bb90fbcdbc4f70136058d3 /src/containers/sidebars/topology/rack/EmptySlotContainer.js
parent5020d7c293beb08699897e003525059396c16424 (diff)
Hide all construction elements in simulation
Diffstat (limited to 'src/containers/sidebars/topology/rack/EmptySlotContainer.js')
-rw-r--r--src/containers/sidebars/topology/rack/EmptySlotContainer.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/containers/sidebars/topology/rack/EmptySlotContainer.js b/src/containers/sidebars/topology/rack/EmptySlotContainer.js
index 97abf473..aa0673d1 100644
--- a/src/containers/sidebars/topology/rack/EmptySlotContainer.js
+++ b/src/containers/sidebars/topology/rack/EmptySlotContainer.js
@@ -2,6 +2,12 @@ import {connect} from "react-redux";
import {addMachine} from "../../../../actions/topology/rack";
import EmptySlotComponent from "../../../../components/sidebars/topology/rack/EmptySlotComponent";
+const mapStateToProps = state => {
+ return {
+ inSimulation: state.currentExperimentId !== -1
+ };
+};
+
const mapDispatchToProps = (dispatch, ownProps) => {
return {
onAdd: () => dispatch(addMachine(ownProps.position)),
@@ -9,7 +15,7 @@ const mapDispatchToProps = (dispatch, ownProps) => {
};
const EmptySlotContainer = connect(
- undefined,
+ mapStateToProps,
mapDispatchToProps
)(EmptySlotComponent);