summaryrefslogtreecommitdiff
path: root/src/containers/map/layers
diff options
context:
space:
mode:
Diffstat (limited to 'src/containers/map/layers')
-rw-r--r--src/containers/map/layers/HoverTileLayer.js23
1 files changed, 23 insertions, 0 deletions
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;