From 3f736cd3db63f106eac02f220477b4a0f3b0eceb Mon Sep 17 00:00:00 2001 From: Georgios Andreadis Date: Thu, 31 Aug 2017 17:59:51 +0200 Subject: Implement room creation --- src/containers/map/layers/HoverTileLayer.js | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 src/containers/map/layers/HoverTileLayer.js (limited to 'src/containers/map/layers/HoverTileLayer.js') diff --git a/src/containers/map/layers/HoverTileLayer.js b/src/containers/map/layers/HoverTileLayer.js new file mode 100644 index 00000000..b8868233 --- /dev/null +++ b/src/containers/map/layers/HoverTileLayer.js @@ -0,0 +1,23 @@ +import {connect} from "react-redux"; +import {toggleTileAtLocation} from "../../../actions/topology"; +import HoverTileLayerComponent from "../../../components/map/layers/HoverTileLayerComponent"; + +const mapStateToProps = state => { + return { + currentRoomInConstruction: state.currentRoomInConstruction, + isValid: (x, y) => true, // TODO implement proper validation + }; +}; + +const mapDispatchToProps = dispatch => { + return { + onClick: (x, y) => dispatch(toggleTileAtLocation(x, y)), + }; +}; + +const HoverTileLayer = connect( + mapStateToProps, + mapDispatchToProps +)(HoverTileLayerComponent); + +export default HoverTileLayer; -- cgit v1.2.3