Client: navbar update

This commit is contained in:
SamR1 2017-12-26 16:02:46 +01:00
parent 4f70e5404f
commit 1a888cd8f5

View File

@ -18,7 +18,6 @@ function NavBar (props) {
> >
<span className="navbar-toggler-icon" /> <span className="navbar-toggler-icon" />
</button> </button>
<div className="collapse navbar-collapse" id="navbarSupportedContent"> <div className="collapse navbar-collapse" id="navbarSupportedContent">
<ul className="navbar-nav mr-auto"> <ul className="navbar-nav mr-auto">
<li className="nav-item"> <li className="nav-item">
@ -31,6 +30,20 @@ function NavBar (props) {
Dashboard Dashboard
</Link> </Link>
</li> </li>
</ul>
<ul className="navbar-nav flex-row ml-md-auto d-none d-md-flex">
{!props.user.isAuthenticated && (
<li className="nav-item">
<Link
className="nav-link"
to={{
pathname: '/register',
}}
>
Register
</Link>
</li>
)}
{!props.user.isAuthenticated && ( {!props.user.isAuthenticated && (
<li className="nav-item"> <li className="nav-item">
<Link <Link
@ -43,17 +56,10 @@ function NavBar (props) {
</Link> </Link>
</li> </li>
)} )}
{!props.user.isAuthenticated && ( {props.user.isAuthenticated && (
<li className="nav-item"> <li className="nav-item">
<Link <a className="nav-link">{props.user.username}</a>
className="nav-link" </li>
to={{
pathname: '/register',
}}
>
Register
</Link>
</li>
)} )}
{props.user.isAuthenticated && ( {props.user.isAuthenticated && (
<li className="nav-item"> <li className="nav-item">