Remove upload option from Sidebar if not authenticated
This commit is contained in:
parent
41637d2837
commit
72622df155
1 changed files with 16 additions and 13 deletions
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue