From 7e2ef010399c0a308131c14beca1f35eb9e331fd Mon Sep 17 00:00:00 2001 From: Ildar Kamalov Date: Fri, 13 Mar 2020 12:20:48 +0300 Subject: [PATCH] - client: fix closing mobile menu --- client/src/components/Header/Menu.js | 9 ++++----- client/src/components/Header/index.js | 1 - 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/client/src/components/Header/Menu.js b/client/src/components/Header/Menu.js index 3e0612b3..a0ae5abb 100644 --- a/client/src/components/Header/Menu.js +++ b/client/src/components/Header/Menu.js @@ -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 && ( @@ -106,7 +106,7 @@ class Menu extends Component {
  • {this.getNavLink({ ...item, className: 'nav-link' })}
  • @@ -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, }; diff --git a/client/src/components/Header/index.js b/client/src/components/Header/index.js index 12373b9e..92a727bb 100644 --- a/client/src/components/Header/index.js +++ b/client/src/components/Header/index.js @@ -55,7 +55,6 @@ class Header extends Component {