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 Create file
</button> </button>
</li> </li>
<li> {
<button this.props.user.authenticated &&
aria-label="upload file" <li>
onClick={() => { <button
this.props.openUploadFileModal(rootFile.id); aria-label="upload file"
setTimeout(this.props.closeProjectOptions, 0); onClick={() => {
}} this.props.openUploadFileModal(rootFile.id);
onBlur={this.onBlurComponent} setTimeout(this.props.closeProjectOptions, 0);
onFocus={this.onFocusComponent} }}
> onBlur={this.onBlurComponent}
Upload file onFocus={this.onFocusComponent}
</button> >
</li> Upload file
</button>
</li>
}
</ul> </ul>
</div> </div>
</div> </div>