diff options
Diffstat (limited to 'src/containers/map/TileContainer.js')
| -rw-r--r-- | src/containers/map/TileContainer.js | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/containers/map/TileContainer.js b/src/containers/map/TileContainer.js new file mode 100644 index 00000000..0456c423 --- /dev/null +++ b/src/containers/map/TileContainer.js @@ -0,0 +1,26 @@ +import {connect} from "react-redux"; +import {goFromRoomToObject} from "../../actions/interaction-level"; +import TileGroup from "../../components/map/groups/TileGroup"; + +const mapStateToProps = state => { + return { + interactionLevel: state.interactionLevel + }; +}; + +const mapDispatchToProps = (dispatch, ownProps) => { + return { + onClick: () => { + if (ownProps.tile.objectType) { + dispatch(goFromRoomToObject(ownProps.tile.id)) + } + } + }; +}; + +const TileContainer = connect( + mapStateToProps, + mapDispatchToProps +)(TileGroup); + +export default TileContainer; |
