diff options
author | Noah Loomans <noahloomans@gmail.com> | 2018-06-28 13:45:27 +0200 |
---|---|---|
committer | Noah Loomans <noahloomans@gmail.com> | 2018-06-28 13:45:27 +0200 |
commit | 9efc432e160b429a0643c38e28140bcf42af30a7 (patch) | |
tree | 2ff1722ed690dc673c8a83cbbf03b40b6526d9f3 /src/client/react/components/container | |
parent | 9e55c4b1a151b434cba4b4425514c3aeac6f22d8 (diff) |
Add history to redux thunk
Diffstat (limited to 'src/client/react/components/container')
-rw-r--r-- | src/client/react/components/container/Menu.js | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/client/react/components/container/Menu.js b/src/client/react/components/container/Menu.js index 0e81fde..c9e6ba3 100644 --- a/src/client/react/components/container/Menu.js +++ b/src/client/react/components/container/Menu.js @@ -19,18 +19,12 @@ */ import { connect } from 'react-redux'; -import { withRouter } from 'react-router-dom'; -import { makeSetUser, userFromMatch } from '../../lib/url'; +import { showRoomFinder } from '../../store/actions'; import Menu from '../presentational/Menu'; -const mapStateToProps = (state, { match }) => ({ - user: userFromMatch(match), +const mapDispatchToProps = dispatch => ({ + showRoomFinder: () => dispatch(showRoomFinder()), }); -const mapDispatchToProps = (dispatch, { history }) => ({ - setUser: makeSetUser(history), - showRoomFinder: () => dispatch({ type: 'ROOM_FINDER/SHOW' }), -}); - -export default withRouter(connect(mapStateToProps, mapDispatchToProps)(Menu)); +export default connect(null, mapDispatchToProps)(Menu); |