Commit 342feb90 authored by mgabdev's avatar mgabdev

Updated sidebar menu item placement

added body class to to stop scroll when sidebar menu is open
parent 9e3d4f53
......@@ -57,6 +57,14 @@ class SidebarMenu extends ImmutablePureComponent {
onClose: PropTypes.func.isRequired,
};
componentDidUpdate () {
if (this.props.sidebarOpen) {
document.body.classList.add('with-modals--active');
} else {
document.body.classList.remove('with-modals--active');
}
}
render () {
const { sidebarOpen, onClose, intl, account } = this.props;
const acct = account.get('acct');
......@@ -120,6 +128,10 @@ class SidebarMenu extends ImmutablePureComponent {
</div>
<div className='sidebar-menu__section'>
<a className='sidebar-menu-item' href='/settings/preferences'>
<Icon id='cog' />
<span className='sidebar-menu-item__title'>{intl.formatMessage(messages.preferences)}</span>
</a>
<NavLink className='sidebar-menu-item' to='/follow_requests' onClick={onClose}>
<Icon id='user-plus' />
<span className='sidebar-menu-item__title'>{intl.formatMessage(messages.follow_requests)}</span>
......@@ -140,10 +152,6 @@ class SidebarMenu extends ImmutablePureComponent {
<Icon id='filter' />
<span className='sidebar-menu-item__title'>{intl.formatMessage(messages.filters)}</span>
</a>
<a className='sidebar-menu-item' href='/settings/preferences'>
<Icon id='cog' />
<span className='sidebar-menu-item__title'>{intl.formatMessage(messages.preferences)}</span>
</a>
</div>
<div className='sidebar-menu__section'>
......
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