change nav if user is logged in, if project is saved
This commit is contained in:
parent
da2739d3a9
commit
f5c63dddad
1 changed files with 46 additions and 22 deletions
|
@ -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">
|
||||
|
|
Loading…
Reference in a new issue