- client: fix closing mobile menu

This commit is contained in:
Ildar Kamalov 2020-03-13 12:20:48 +03:00
parent b600d7b09d
commit 7e2ef01039
2 changed files with 4 additions and 6 deletions

View file

@ -45,8 +45,8 @@ class Menu extends Component {
this.props.closeMenu();
};
toggleMenu = () => {
this.props.toggleMenuOpen();
closeMenu = () => {
this.props.closeMenu();
};
getActiveClassForDropdown = (URLS) => {
@ -64,7 +64,7 @@ class Menu extends Component {
key={route}
exact={exact || false}
className={`order-${order} ${className}`}
onClick={this.toggleMenu}
onClick={this.closeMenu}
>
{icon && (
<svg className="nav-icon">
@ -106,7 +106,7 @@ class Menu extends Component {
<li
className={`nav-item order-${item.order}`}
key={item.text}
onClick={this.toggleMenu}
onClick={this.closeMenu}
>
{this.getNavLink({ ...item, className: 'nav-link' })}
</li>
@ -135,7 +135,6 @@ class Menu extends Component {
Menu.propTypes = {
isMenuOpen: PropTypes.bool,
closeMenu: PropTypes.func,
toggleMenuOpen: PropTypes.func,
location: PropTypes.object,
t: PropTypes.func,
};

View file

@ -55,7 +55,6 @@ class Header extends Component {
<Menu
location={location}
isMenuOpen={isMenuOpen}
toggleMenuOpen={this.toggleMenuOpen}
closeMenu={this.closeMenu}
/>
<div className="header__column">