change nav if user is logged in, if project is saved

This commit is contained in:
catarak 2016-08-17 19:00:05 -04:00
parent da2739d3a9
commit f5c63dddad

View file

@ -21,28 +21,52 @@ function Nav(props) {
Save Save
</a> </a>
</li> </li>
<li className="nav__item"> {(() => { // eslint-disable-line
<a className="nav__clone" onClick={props.cloneProject}> if (props.project.id) {
Duplicate return (
</a> <li className="nav__item">
</li> <a className="nav__clone" onClick={props.cloneProject}>
<li className="nav__item"> Duplicate
<a className="nav__export" onClick={props.exportProjectAsZip}> </a>
Download </li>
</a> );
</li> }
<li className="nav__item"> })()}
<Link to={`/full/${props.project.id}`} target="_blank"> {(() => { // eslint-disable-line
Fullscreen if (props.project.id) {
</Link> return (
</li> <li className="nav__item">
<li className="nav__item"> <a className="nav__export" onClick={props.exportProjectAsZip}>
<p className="nav__open"> Download
<Link to="/sketches"> </a>
Open </li>
</Link> );
</p> }
</li> })()}
{(() => { // eslint-disable-line
if (props.project.id) {
return (
<li className="nav__item">
<Link to={`/full/${props.project.id}`} target="_blank">
Fullscreen
</Link>
</li>
);
}
})()}
{(() => { // eslint-disable-line
if (props.user.authenticated) {
return (
<li className="nav__item">
<p className="nav__open">
<Link to="/sketches">
Open
</Link>
</p>
</li>
);
}
})()}
</ul> </ul>
<ul className="nav__items-right" title="user-menu"> <ul className="nav__items-right" title="user-menu">
<li className="nav__item"> <li className="nav__item">