fix(footer): change nonLearnPage to showFooter
This commit is contained in:
@ -30,28 +30,20 @@ export const wrapPageElement = ({ element, props }) => {
|
||||
} = props;
|
||||
if (pathname === '/') {
|
||||
return (
|
||||
<DefaultLayout
|
||||
disableSettings={true}
|
||||
landingPage={true}
|
||||
nonLearnPage={true}
|
||||
>
|
||||
<DefaultLayout disableSettings={true} landingPage={true}>
|
||||
{element}
|
||||
</DefaultLayout>
|
||||
);
|
||||
}
|
||||
if ((/^\/guide(\/.*)*/).test(pathname)) {
|
||||
return (
|
||||
<DefaultLayout nonLearnPage={true}>
|
||||
<DefaultLayout>
|
||||
<GuideLayout>{element}</GuideLayout>
|
||||
</DefaultLayout>
|
||||
);
|
||||
}
|
||||
if (false === (/^\/learn(\/.*)*/).test(pathname)) {
|
||||
return (
|
||||
<DefaultLayout nonLearnPage={true}>
|
||||
{element}
|
||||
</DefaultLayout>
|
||||
);
|
||||
if ((/^\/learn(\/.*)*/).test(pathname)) {
|
||||
return <DefaultLayout showFooter={false}>{element}</DefaultLayout>;
|
||||
}
|
||||
return <DefaultLayout>{element}</DefaultLayout>;
|
||||
};
|
||||
|
@ -30,28 +30,20 @@ export const wrapPageElement = ({ element, props }) => {
|
||||
} = props;
|
||||
if (pathname === '/') {
|
||||
return (
|
||||
<DefaultLayout
|
||||
disableSettings={true}
|
||||
landingPage={true}
|
||||
nonLearnPage={true}
|
||||
>
|
||||
<DefaultLayout disableSettings={true} landingPage={true}>
|
||||
{element}
|
||||
</DefaultLayout>
|
||||
);
|
||||
}
|
||||
if ((/^\/guide(\/.*)*/).test(pathname)) {
|
||||
return (
|
||||
<DefaultLayout nonLearnPage={true}>
|
||||
<DefaultLayout>
|
||||
<GuideLayout>{element}</GuideLayout>
|
||||
</DefaultLayout>
|
||||
);
|
||||
}
|
||||
if (false === (/^\/learn(\/.*)*/).test(pathname)) {
|
||||
return (
|
||||
<DefaultLayout nonLearnPage={true}>
|
||||
{element}
|
||||
</DefaultLayout>
|
||||
);
|
||||
if ((/^\/learn(\/.*)*/).test(pathname)) {
|
||||
return <DefaultLayout showFooter={false}>{element}</DefaultLayout>;
|
||||
}
|
||||
return <DefaultLayout>{element}</DefaultLayout>;
|
||||
};
|
||||
|
@ -69,9 +69,9 @@ const propTypes = {
|
||||
isOnline: PropTypes.bool.isRequired,
|
||||
isSignedIn: PropTypes.bool,
|
||||
landingPage: PropTypes.bool,
|
||||
nonLearnPage: PropTypes.bool,
|
||||
onlineStatusChange: PropTypes.func.isRequired,
|
||||
removeFlashMessage: PropTypes.func.isRequired
|
||||
removeFlashMessage: PropTypes.func.isRequired,
|
||||
showFooter: PropTypes.bool
|
||||
};
|
||||
|
||||
const mapStateToProps = createSelector(
|
||||
@ -139,7 +139,7 @@ class DefaultLayout extends Component {
|
||||
flashMessages = [],
|
||||
removeFlashMessage,
|
||||
landingPage,
|
||||
nonLearnPage,
|
||||
showFooter = true,
|
||||
isOnline,
|
||||
isSignedIn
|
||||
} = this.props;
|
||||
@ -166,7 +166,7 @@ class DefaultLayout extends Component {
|
||||
) : null}
|
||||
{children}
|
||||
</div>
|
||||
{nonLearnPage ? (<Footer />) : null}
|
||||
{showFooter && (<Footer />)}
|
||||
</Fragment>
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user