Remove upload option from Sidebar if not authenticated

This commit is contained in:
Cassie Tarakajian 2020-04-16 16:16:19 -04:00
parent 41637d2837
commit 72622df155

View file

@ -113,19 +113,22 @@ class Sidebar extends React.Component {
Create file
</button>
</li>
<li>
<button
aria-label="upload file"
onClick={() => {
this.props.openUploadFileModal(rootFile.id);
setTimeout(this.props.closeProjectOptions, 0);
}}
onBlur={this.onBlurComponent}
onFocus={this.onFocusComponent}
>
Upload file
</button>
</li>
{
this.props.user.authenticated &&
<li>
<button
aria-label="upload file"
onClick={() => {
this.props.openUploadFileModal(rootFile.id);
setTimeout(this.props.closeProjectOptions, 0);
}}
onBlur={this.onBlurComponent}
onFocus={this.onFocusComponent}
>
Upload file
</button>
</li>
}
</ul>
</div>
</div>