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/presentational | |
parent | 9e55c4b1a151b434cba4b4425514c3aeac6f22d8 (diff) |
Add history to redux thunk
Diffstat (limited to 'src/client/react/components/presentational')
-rw-r--r-- | src/client/react/components/presentational/Menu.js | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/src/client/react/components/presentational/Menu.js b/src/client/react/components/presentational/Menu.js index d43c1d3..077a2e4 100644 --- a/src/client/react/components/presentational/Menu.js +++ b/src/client/react/components/presentational/Menu.js @@ -23,30 +23,18 @@ import { PropTypes } from 'prop-types'; import { Button, ButtonIcon } from 'rmwc/Button'; import { SimpleMenu, MenuItem } from 'rmwc/Menu'; import { Icon } from 'rmwc/Icon'; -import users from '../../users'; import './Menu.scss'; class Menu extends React.Component { static propTypes = { - user: PropTypes.string, - setUser: PropTypes.func.isRequired, showRoomFinder: PropTypes.func.isRequired, } - static defaultProps = { - user: null, - } - onItemSelected(index) { switch (index) { case 'room_finder': { - const { setUser, user, showRoomFinder } = this.props; - - if (user == null || users.byId[user].type !== 'r') { - // We are not currently viewing a room, correct the situation. - setUser(users.allRoomIds[0]); - } + const { showRoomFinder } = this.props; showRoomFinder(); break; |