fix: redux folder relocated and local func renamed

This commit is contained in:
Ahmad Abdolsaheb
2019-02-21 17:31:54 +03:00
committed by Stuart Taylor
parent 6cdfbc87d8
commit 08f737a0b9
5 changed files with 17 additions and 14 deletions

View File

@@ -11,7 +11,10 @@ import { Link } from '../helpers';
import './header.css';
import { toggleDisplaySideNav, toggleDisplayMenu } from '../layouts/redux';
import {
toggleDisplaySideNav,
toggleDisplayMenu
} from '../layouts/components/guide/redux';
const mapStateToProps = state => {
return {
@@ -45,7 +48,7 @@ class Header extends Component {
console.log('header unmount');
}
toggleDisplayMenu = () => {
toggleDisplayMenuLogic = () => {
if (this.props.onGuide) {
this.props.toggleDisplaySideNav();
} else {
@@ -59,13 +62,13 @@ class Header extends Component {
!this.menuButtonRef.current.contains(event.target) &&
!this.props.onGuide
) {
toggleDisplayMenu();
this.toggleDisplayMenuLogic();
}
};
handleMediaChange = matches => {
if (!matches && this.props.displayMenu) {
toggleDisplayMenu();
this.toggleDisplayMenuLogic();
}
};
@@ -120,7 +123,7 @@ class Header extends Component {
)}
<span
className='menu-button'
onClick={this.toggleDisplayMenu}
onClick={this.toggleDisplayMenuLogic}
ref={this.menuButtonRef}
>
Menu