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
</a>
</li>
{(() => { // eslint-disable-line
if (props.project.id) {
return (
<li className="nav__item">
<a className="nav__clone" onClick={props.cloneProject}>
Duplicate
</a>
</li>
);
}
})()}
{(() => { // eslint-disable-line
if (props.project.id) {
return (
<li className="nav__item">
<a className="nav__export" onClick={props.exportProjectAsZip}>
Download
</a>
</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">
@ -43,6 +64,9 @@ function Nav(props) {
</Link>
</p>
</li>
);
}
})()}
</ul>
<ul className="nav__items-right" title="user-menu">
<li className="nav__item">