Updated sidebar to be disabled if no current user
This commit is contained in:
parent
004dde2543
commit
9ed74bcc08
@ -58,6 +58,8 @@ class SidebarMenu extends ImmutablePureComponent {
|
|||||||
};
|
};
|
||||||
|
|
||||||
componentDidUpdate () {
|
componentDidUpdate () {
|
||||||
|
if (!me) return;
|
||||||
|
|
||||||
if (this.props.sidebarOpen) {
|
if (this.props.sidebarOpen) {
|
||||||
document.body.classList.add('with-modals--active');
|
document.body.classList.add('with-modals--active');
|
||||||
} else {
|
} else {
|
||||||
@ -67,6 +69,9 @@ class SidebarMenu extends ImmutablePureComponent {
|
|||||||
|
|
||||||
render () {
|
render () {
|
||||||
const { sidebarOpen, onClose, intl, account } = this.props;
|
const { sidebarOpen, onClose, intl, account } = this.props;
|
||||||
|
|
||||||
|
if (!me || !account) return null;
|
||||||
|
|
||||||
const acct = account.get('acct');
|
const acct = account.get('acct');
|
||||||
|
|
||||||
const classes = classNames('sidebar-menu__root', {
|
const classes = classNames('sidebar-menu__root', {
|
||||||
|
@ -540,7 +540,7 @@ class UI extends React.PureComponent {
|
|||||||
<LoadingBarContainer className='loading-bar' />
|
<LoadingBarContainer className='loading-bar' />
|
||||||
<ModalContainer />
|
<ModalContainer />
|
||||||
<UploadArea active={draggingOver} onClose={this.closeUploadModal} />
|
<UploadArea active={draggingOver} onClose={this.closeUploadModal} />
|
||||||
<SidebarMenu />
|
{ me && <SidebarMenu />}
|
||||||
</div>
|
</div>
|
||||||
</HotKeys>
|
</HotKeys>
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user