fix(client): always show footer on 404 page
This commit is contained in:
@ -8,6 +8,7 @@ import {
|
|||||||
} from '../../src/components/layouts';
|
} from '../../src/components/layouts';
|
||||||
// eslint-disable-next-line max-len
|
// eslint-disable-next-line max-len
|
||||||
import GuideNavMenu from '../../src/components/layouts/components/guide/NavMenu';
|
import GuideNavMenu from '../../src/components/layouts/components/guide/NavMenu';
|
||||||
|
import FourOhFourPage from '../../src/pages/404';
|
||||||
|
|
||||||
export default function layoutSelector({ element, props }) {
|
export default function layoutSelector({ element, props }) {
|
||||||
const {
|
const {
|
||||||
@ -20,6 +21,9 @@ export default function layoutSelector({ element, props }) {
|
|||||||
</DefaultLayout>
|
</DefaultLayout>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
if (element.type === FourOhFourPage) {
|
||||||
|
return <DefaultLayout pathname={pathname}>{element}</DefaultLayout>;
|
||||||
|
}
|
||||||
if (/^\/certification(\/.*)*/.test(pathname)) {
|
if (/^\/certification(\/.*)*/.test(pathname)) {
|
||||||
return <CertificationLayout>{element}</CertificationLayout>;
|
return <CertificationLayout>{element}</CertificationLayout>;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user