From a1b84c219afbc5e0ba76a221cde2f324a22ef3e6 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Fri, 7 Sep 2018 13:12:12 +0200 Subject: [PATCH] Profile access thorugh LoggedIn user menu --- client/src/components/LoggedInUserMenu.js | 9 ++++++--- client/src/components/NavBar.js | 3 --- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/client/src/components/LoggedInUserMenu.js b/client/src/components/LoggedInUserMenu.js index bcc95283f..5bfaf4ad6 100644 --- a/client/src/components/LoggedInUserMenu.js +++ b/client/src/components/LoggedInUserMenu.js @@ -4,7 +4,11 @@ import Menu from '@material-ui/core/Menu'; import MenuItem from '@material-ui/core/MenuItem'; import toRenderProps from 'recompose/toRenderProps'; import withState from 'recompose/withState'; +import { Link } from 'react-router-dom'; +import ProfileIcon from '@material-ui/icons/Person'; + +const UserLink = props => const WithState = toRenderProps(withState('anchorEl', 'updateAnchorEl', null)); class LoggedInUserMenu extends Component { @@ -33,13 +37,12 @@ class LoggedInUserMenu extends Component { onClick={event => { updateAnchorEl(event.currentTarget); }} - color="inherit" + color="inherit" > {this.props.menuLabel} - Profile - My account +
Profile
Logout
diff --git a/client/src/components/NavBar.js b/client/src/components/NavBar.js index f8fff00cc..b06d7fdeb 100644 --- a/client/src/components/NavBar.js +++ b/client/src/components/NavBar.js @@ -9,7 +9,6 @@ import IconButton from '@material-ui/core/IconButton'; // icons import MenuIcon from '@material-ui/icons/Menu'; import HomeIcon from '@material-ui/icons/Home'; -import ProfileIcon from '@material-ui/icons/Person'; import BrowseIcon from '@material-ui/icons/ImportContacts'; import SearchIcon from '@material-ui/icons/Search'; import ContactIcon from '@material-ui/icons/ContactMail'; @@ -25,7 +24,6 @@ const AboutLink = props => const ContactLink = props => const SearchLink = props => const BrowseLink = props => -const UserLink = props => const HomeLink = props => const styles = { @@ -72,7 +70,6 @@ class NavBar extends Component { -