Added worktype menu option, usertype check, deletion confirmation, redirect
This commit is contained in:
@@ -20,11 +20,12 @@ class Navbar extends Component {
|
||||
};
|
||||
|
||||
render() {
|
||||
const { userToken } = this.props;
|
||||
const { userToken, selfUser } = this.props;
|
||||
return (
|
||||
<NavbarView
|
||||
isAuthenticated={!!userToken}
|
||||
dispatchLogoutRequest={this.dispatchLogoutRequest}
|
||||
selfUser={selfUser}
|
||||
/>
|
||||
);
|
||||
}
|
||||
@@ -37,7 +38,7 @@ function mapStateToProps(state) {
|
||||
};
|
||||
}
|
||||
|
||||
const NavbarView = ({ isAuthenticated, dispatchLogoutRequest }) => (
|
||||
const NavbarView = ({ isAuthenticated, dispatchLogoutRequest, selfUser }) => (
|
||||
<Menu>
|
||||
<Menu.Item as={Link} to="/">
|
||||
Caremyway
|
||||
@@ -61,6 +62,10 @@ const NavbarView = ({ isAuthenticated, dispatchLogoutRequest }) => (
|
||||
<Dropdown.Item as={Link} to="/user/profile">
|
||||
My Profile
|
||||
</Dropdown.Item>
|
||||
{selfUser.client &&
|
||||
<Dropdown.Item as={Link} to="/user/profile/client/worktypes">
|
||||
Work Types
|
||||
</Dropdown.Item>}
|
||||
<Dropdown.Item as={Link} to="/auth/settings">
|
||||
Settings
|
||||
</Dropdown.Item>
|
||||
|
||||
Reference in New Issue
Block a user