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