summaryrefslogtreecommitdiff
path: root/src/containers/map/layers/HoverTileLayer.js
blob: b88682337cbe6a652489a86e58a1f3162690a185 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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;