Commit 9ed74bcc authored by mgabdev's avatar mgabdev

Updated sidebar to be disabled if no current user

parent 004dde25
......@@ -58,6 +58,8 @@ class SidebarMenu extends ImmutablePureComponent {
};
componentDidUpdate () {
if (!me) return;
if (this.props.sidebarOpen) {
document.body.classList.add('with-modals--active');
} else {
......@@ -67,6 +69,9 @@ class SidebarMenu extends ImmutablePureComponent {
render () {
const { sidebarOpen, onClose, intl, account } = this.props;
if (!me || !account) return null;
const acct = account.get('acct');
const classes = classNames('sidebar-menu__root', {
......
......@@ -540,7 +540,7 @@ class UI extends React.PureComponent {
<LoadingBarContainer className='loading-bar' />
<ModalContainer />
<UploadArea active={draggingOver} onClose={this.closeUploadModal} />
<SidebarMenu />
{ me && <SidebarMenu />}
</div>
</HotKeys>
);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment