mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2024-11-25 22:45:46 +03:00
- client: fix closing mobile menu
This commit is contained in:
parent
b600d7b09d
commit
7e2ef01039
2 changed files with 4 additions and 6 deletions
|
@ -45,8 +45,8 @@ class Menu extends Component {
|
||||||
this.props.closeMenu();
|
this.props.closeMenu();
|
||||||
};
|
};
|
||||||
|
|
||||||
toggleMenu = () => {
|
closeMenu = () => {
|
||||||
this.props.toggleMenuOpen();
|
this.props.closeMenu();
|
||||||
};
|
};
|
||||||
|
|
||||||
getActiveClassForDropdown = (URLS) => {
|
getActiveClassForDropdown = (URLS) => {
|
||||||
|
@ -64,7 +64,7 @@ class Menu extends Component {
|
||||||
key={route}
|
key={route}
|
||||||
exact={exact || false}
|
exact={exact || false}
|
||||||
className={`order-${order} ${className}`}
|
className={`order-${order} ${className}`}
|
||||||
onClick={this.toggleMenu}
|
onClick={this.closeMenu}
|
||||||
>
|
>
|
||||||
{icon && (
|
{icon && (
|
||||||
<svg className="nav-icon">
|
<svg className="nav-icon">
|
||||||
|
@ -106,7 +106,7 @@ class Menu extends Component {
|
||||||
<li
|
<li
|
||||||
className={`nav-item order-${item.order}`}
|
className={`nav-item order-${item.order}`}
|
||||||
key={item.text}
|
key={item.text}
|
||||||
onClick={this.toggleMenu}
|
onClick={this.closeMenu}
|
||||||
>
|
>
|
||||||
{this.getNavLink({ ...item, className: 'nav-link' })}
|
{this.getNavLink({ ...item, className: 'nav-link' })}
|
||||||
</li>
|
</li>
|
||||||
|
@ -135,7 +135,6 @@ class Menu extends Component {
|
||||||
Menu.propTypes = {
|
Menu.propTypes = {
|
||||||
isMenuOpen: PropTypes.bool,
|
isMenuOpen: PropTypes.bool,
|
||||||
closeMenu: PropTypes.func,
|
closeMenu: PropTypes.func,
|
||||||
toggleMenuOpen: PropTypes.func,
|
|
||||||
location: PropTypes.object,
|
location: PropTypes.object,
|
||||||
t: PropTypes.func,
|
t: PropTypes.func,
|
||||||
};
|
};
|
||||||
|
|
|
@ -55,7 +55,6 @@ class Header extends Component {
|
||||||
<Menu
|
<Menu
|
||||||
location={location}
|
location={location}
|
||||||
isMenuOpen={isMenuOpen}
|
isMenuOpen={isMenuOpen}
|
||||||
toggleMenuOpen={this.toggleMenuOpen}
|
|
||||||
closeMenu={this.closeMenu}
|
closeMenu={this.closeMenu}
|
||||||
/>
|
/>
|
||||||
<div className="header__column">
|
<div className="header__column">
|
||||||
|
|
Loading…
Reference in a new issue