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,21 +21,42 @@ function Nav(props) {
Save Save
</a> </a>
</li> </li>
{(() => { // eslint-disable-line
if (props.project.id) {
return (
<li className="nav__item"> <li className="nav__item">
<a className="nav__clone" onClick={props.cloneProject}> <a className="nav__clone" onClick={props.cloneProject}>
Duplicate Duplicate
</a> </a>
</li> </li>
);
}
})()}
{(() => { // eslint-disable-line
if (props.project.id) {
return (
<li className="nav__item"> <li className="nav__item">
<a className="nav__export" onClick={props.exportProjectAsZip}> <a className="nav__export" onClick={props.exportProjectAsZip}>
Download Download
</a> </a>
</li> </li>
);
}
})()}
{(() => { // eslint-disable-line
if (props.project.id) {
return (
<li className="nav__item"> <li className="nav__item">
<Link to={`/full/${props.project.id}`} target="_blank"> <Link to={`/full/${props.project.id}`} target="_blank">
Fullscreen Fullscreen
</Link> </Link>
</li> </li>
);
}
})()}
{(() => { // eslint-disable-line
if (props.user.authenticated) {
return (
<li className="nav__item"> <li className="nav__item">
<p className="nav__open"> <p className="nav__open">
<Link to="/sketches"> <Link to="/sketches">
@ -43,6 +64,9 @@ function Nav(props) {
</Link> </Link>
</p> </p>
</li> </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">