From 315adeb5e2012b7f7bcfcd1478f9d6dd2cc1092d Mon Sep 17 00:00:00 2001 From: Noah Loomans Date: Tue, 26 Jun 2018 21:46:41 +0200 Subject: Update code to comply with new styling --- src/client/react/components/container/Menu.js | 38 +++++++++++++++++++++------ 1 file changed, 30 insertions(+), 8 deletions(-) (limited to 'src/client/react/components/container/Menu.js') diff --git a/src/client/react/components/container/Menu.js b/src/client/react/components/container/Menu.js index 0b5c4dc..474444d 100644 --- a/src/client/react/components/container/Menu.js +++ b/src/client/react/components/container/Menu.js @@ -44,14 +44,20 @@ class Menu extends React.Component { onItemSelected(index) { switch (index) { case 'room_finder': { - const user = userFromMatch(this.props.match); + const { + match, + location, + history, + dispatch, + } = this.props; + const user = userFromMatch(match); if (user == null || users.byId[user].type !== 'r') { // We are not currently viewing a room, correct the situation. - setUser(users.allRoomIds[0], this.props.location, this.props.history); + setUser(users.allRoomIds[0], location, history); } - this.props.dispatch({ type: 'ROOM_FINDER/SHOW' }); + dispatch({ type: 'ROOM_FINDER/SHOW' }); break; } default: @@ -63,17 +69,33 @@ class Menu extends React.Component { return (
} + handle={( + +)} onSelected={(event) => { // Send the `data-type` of the selected this.onItemSelected(event.detail.item.dataset.type); }} > - Voeg label toe - Maak favoriet + + +Voeg label toe + + + +Maak favoriet +
- Lokaal zoeken - Oud rooster gebruiken + + +Lokaal zoeken + + + +Oud rooster gebruiken +
); -- cgit v1.1