diff --git a/client/gatsby-browser.js b/client/gatsby-browser.js index 7a94672a1e..aeaf002ad7 100644 --- a/client/gatsby-browser.js +++ b/client/gatsby-browser.js @@ -30,28 +30,20 @@ export const wrapPageElement = ({ element, props }) => { } = props; if (pathname === '/') { return ( - + {element} ); } if ((/^\/guide(\/.*)*/).test(pathname)) { return ( - + {element} ); } - if (false === (/^\/learn(\/.*)*/).test(pathname)) { - return ( - - {element} - - ); + if ((/^\/learn(\/.*)*/).test(pathname)) { + return {element}; } return {element}; }; diff --git a/client/gatsby-ssr.js b/client/gatsby-ssr.js index ee63f7c572..583a56bff7 100644 --- a/client/gatsby-ssr.js +++ b/client/gatsby-ssr.js @@ -30,28 +30,20 @@ export const wrapPageElement = ({ element, props }) => { } = props; if (pathname === '/') { return ( - + {element} ); } if ((/^\/guide(\/.*)*/).test(pathname)) { return ( - + {element} ); } - if (false === (/^\/learn(\/.*)*/).test(pathname)) { - return ( - - {element} - - ); + if ((/^\/learn(\/.*)*/).test(pathname)) { + return {element}; } return {element}; }; diff --git a/client/src/components/layouts/Default.js b/client/src/components/layouts/Default.js index 172bf475e5..923316618d 100644 --- a/client/src/components/layouts/Default.js +++ b/client/src/components/layouts/Default.js @@ -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} - {nonLearnPage ? (