fix: redux folder relocated and local func renamed
This commit is contained in:
committed by
Stuart Taylor
parent
6cdfbc87d8
commit
08f737a0b9
@ -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
|
||||
|
@ -69,10 +69,10 @@ const propTypes = {
|
||||
isOnline: PropTypes.bool.isRequired,
|
||||
isSignedIn: PropTypes.bool,
|
||||
landingPage: PropTypes.bool,
|
||||
onGuide: PropTypes.bool,
|
||||
onlineStatusChange: PropTypes.func.isRequired,
|
||||
removeFlashMessage: PropTypes.func.isRequired,
|
||||
showFooter: PropTypes.bool,
|
||||
onGuide: PropTypes.bool
|
||||
showFooter: PropTypes.bool
|
||||
};
|
||||
|
||||
const mapStateToProps = createSelector(
|
||||
@ -160,10 +160,7 @@ class DefaultLayout extends Component {
|
||||
>
|
||||
<style>{fontawesome.dom.css()}</style>
|
||||
</Helmet>
|
||||
<Header
|
||||
disableSettings={disableSettings}
|
||||
onGuide={onGuide}
|
||||
/>
|
||||
<Header disableSettings={disableSettings} onGuide={onGuide} />
|
||||
<div className={`default-layout ${landingPage ? 'landing-page' : ''}`}>
|
||||
<OfflineWarning isOnline={isOnline} isSignedIn={isSignedIn} />
|
||||
{hasMessages ? (
|
||||
|
@ -11,7 +11,10 @@ import Spacer from '../helpers/Spacer';
|
||||
import 'prismjs/themes/prism.css';
|
||||
import './guide.css';
|
||||
|
||||
import { toggleExpandedState, toggleDisplaySideNav } from './redux';
|
||||
import {
|
||||
toggleExpandedState,
|
||||
toggleDisplaySideNav
|
||||
} from './components/guide/redux';
|
||||
|
||||
const propTypes = {
|
||||
children: PropTypes.any,
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { createAction, handleActions } from 'redux-actions';
|
||||
|
||||
import { createTypes } from '../../../utils/createTypes';
|
||||
import { createTypes } from '../../../../../utils/createTypes';
|
||||
|
||||
export const ns = 'guideNav';
|
||||
|
@ -9,7 +9,7 @@ import {
|
||||
import {
|
||||
reducer as guideNav,
|
||||
ns as guideNavNameSpace
|
||||
} from '../components/layouts/redux';
|
||||
} from '../components/layouts/components/guide/redux';
|
||||
import { reducer as settings, ns as settingsNameSpace } from './settings';
|
||||
import {
|
||||
reducer as curriculumMap,
|
||||
|
Reference in New Issue
Block a user