diff --git a/compforge/src/Components/AppHeader.react.jsx b/compforge/src/Components/AppHeader.react.jsx index 26e514507608b8ba989e94485d98bb5ec4774d95..6b6519ef529cf982f0cc107d87b24a3230b7f7be 100644 --- a/compforge/src/Components/AppHeader.react.jsx +++ b/compforge/src/Components/AppHeader.react.jsx @@ -24,6 +24,7 @@ import PeopleIcon from '@material-ui/icons/People'; //Modals import TemplateModal from './TemplateModal.react'; +import { Divider } from '@material-ui/core'; const useStyles = makeStyles((theme) => ({ root: { @@ -49,15 +50,22 @@ const AppMenu = (props) => { return ( <div className={`appmenu ${props.open ? 'appmenu--open' : ''}` }> <div className={'menuitems'}> - {props.isAuthenticated && <h3> Admin Menu </h3>} - {props.isAuthenticated && <MenuItem onClick={props.toggleModalState} > <AssignmentIcon style={iconStyle} /> Create New Form Template </MenuItem>} - {props.isAuthenticated && <Link style={{ textDecoration: 'none', color: '#444' }} to={'/userhome'}><MenuItem ><DashboardIcon style={iconStyle} /> Form Templates DashBoard</MenuItem></Link>} + {props.isAuthenticated && <h3> Navigation </h3>} + + {props.isAuthenticated && <Link style={{ textDecoration: 'none', color: '#444' }} to={'/'}><MenuItem ><DashboardIcon style={iconStyle} /> DashBoard</MenuItem></Link>} + + {props.isAuthenticated && <MenuItem onClick={props.toggleModalState} > <AssignmentIcon style={iconStyle} /> Create Form </MenuItem>} + {props.isAuthenticated && <Link style={{ textDecoration: 'none', color: '#444' }} to={'/mysubmissions'}><MenuItem ><AccountCircleIcon style={iconStyle} />My Submissions</MenuItem></Link>} - {props.isAuthenticated && <Link style={{ textDecoration: 'none', color: '#444' }} to={'/partnerssubmissions'}><MenuItem ><PeopleIcon style={iconStyle} />Submissions from partners</MenuItem></Link>} - <h3> User Menu </h3> + {props.isAuthenticated && <Link style={{ textDecoration: 'none', color: '#444' }} to={'/partnerssubmissions'}><MenuItem ><PeopleIcon style={iconStyle} />Partner Submissions</MenuItem></Link>} + + {props.isAuthenticated && <h3> Settings </h3>} + {!props.isAuthenticated && <Link style={{ textDecoration: 'none', color: '#444' }} to={'/login'}><MenuItem > <AccountCircleIcon style={{marginRight: 8}} /> Log In</MenuItem></Link>} {!props.isAuthenticated && <Link style={{ textDecoration: 'none', color: '#444' }} to={'/signup'}><MenuItem > <PeopleIcon style={{marginRight: 8}} /> Sign Up</MenuItem></Link>} + + {props.isAuthenticated && <Link style={{ textDecoration: 'none', color: '#444' }} to={'/account'}><MenuItem ><PeopleIcon style={iconStyle} />My Account</MenuItem></Link>} {props.isAuthenticated && <MenuItem onClick={props.logout}> <PowerSettingsNewIcon style={iconStyle} /> Logout</MenuItem>} </div>