From bf7708f658cc6299a3b775afe24459b5a808c54d Mon Sep 17 00:00:00 2001 From: Georgios Andreadis Date: Fri, 22 Sep 2017 21:20:54 +0200 Subject: Restructure component and container directories --- .../topology/room/RackConstructionContainer.js | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 src/containers/app/sidebars/topology/room/RackConstructionContainer.js (limited to 'src/containers/app/sidebars/topology/room/RackConstructionContainer.js') diff --git a/src/containers/app/sidebars/topology/room/RackConstructionContainer.js b/src/containers/app/sidebars/topology/room/RackConstructionContainer.js new file mode 100644 index 00000000..f06a3ab2 --- /dev/null +++ b/src/containers/app/sidebars/topology/room/RackConstructionContainer.js @@ -0,0 +1,23 @@ +import {connect} from "react-redux"; +import {startRackConstruction, stopRackConstruction} from "../../../../../actions/topology/room"; +import RackConstructionComponent from "../../../../../components/app/sidebars/topology/room/RackConstructionComponent"; + +const mapStateToProps = state => { + return { + inRackConstructionMode: state.construction.inRackConstructionMode, + }; +}; + +const mapDispatchToProps = dispatch => { + return { + onStart: () => dispatch(startRackConstruction()), + onStop: () => dispatch(stopRackConstruction()), + }; +}; + +const RackConstructionContainer = connect( + mapStateToProps, + mapDispatchToProps +)(RackConstructionComponent); + +export default RackConstructionContainer; -- cgit v1.2.3