diff options
author | Noah Loomans <noahloomans@gmail.com> | 2018-06-27 16:35:52 +0200 |
---|---|---|
committer | Noah Loomans <noahloomans@gmail.com> | 2018-06-27 16:37:25 +0200 |
commit | 949974e3edc11ffb144ead7f8a5f70d93e532e3c (patch) | |
tree | 2e2b4837efdcbab8a5d2b2cc7c8ca4627867aa6e /src/client/react/components/container/RoomFinder.js | |
parent | ba319c58150e832a79e7474bbe78738082580c77 (diff) |
Move callbacks to mapDispatchToProps
Diffstat (limited to 'src/client/react/components/container/RoomFinder.js')
-rw-r--r-- | src/client/react/components/container/RoomFinder.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client/react/components/container/RoomFinder.js b/src/client/react/components/container/RoomFinder.js index f6e7ac6..c8c506b 100644 --- a/src/client/react/components/container/RoomFinder.js +++ b/src/client/react/components/container/RoomFinder.js @@ -100,13 +100,13 @@ class RoomFinder extends React.Component { } } -const mapStateToProps = (state, { match, location, history }) => ({ +const mapStateToProps = (state, { match }) => ({ user: userFromMatch(match), - setUser: makeSetUser(location, history), isVisible: state.isRoomFinderVisible, }); -const mapDispatchToProps = dispatch => ({ +const mapDispatchToProps = (dispatch, { location, history }) => ({ + setUser: makeSetUser(location, history), onHide: () => dispatch({ type: 'ROOM_FINDER/HIDE' }), }); |