fix(certs): remove footer and nav from certs (#35333)
* fix(certs): remove footer and nav from certs * fix: revert spacing on cert
This commit is contained in:
committed by
Ahmad Abdolsaheb
parent
163540f8fc
commit
293e58cc23
@ -5,8 +5,11 @@ import { Provider } from 'react-redux';
|
||||
import { createStore } from './src/redux/createStore';
|
||||
import AppMountNotifier from './src/components/AppMountNotifier';
|
||||
import GuideNavContextProvider from './src/contexts/GuideNavigationContext';
|
||||
import DefaultLayout from './src/components/layouts/Default';
|
||||
import GuideLayout from './src/components/layouts/Guide';
|
||||
import {
|
||||
CertificationLayout,
|
||||
DefaultLayout,
|
||||
GuideLayout
|
||||
} from './src/components/layouts';
|
||||
|
||||
const store = createStore();
|
||||
|
||||
@ -35,6 +38,9 @@ export const wrapPageElement = ({ element, props }) => {
|
||||
</DefaultLayout>
|
||||
);
|
||||
}
|
||||
if (/^\/certification(\/.*)*/.test(pathname)) {
|
||||
return <CertificationLayout>{element}</CertificationLayout>;
|
||||
}
|
||||
if (/^\/guide(\/.*)*/.test(pathname)) {
|
||||
return (
|
||||
<DefaultLayout>
|
||||
|
@ -7,8 +7,11 @@ import headComponents from './src/head';
|
||||
import { createStore } from './src/redux/createStore';
|
||||
|
||||
import GuideNavContextProvider from './src/contexts/GuideNavigationContext';
|
||||
import DefaultLayout from './src/components/layouts/Default';
|
||||
import GuideLayout from './src/components/layouts/Guide';
|
||||
import {
|
||||
CertificationLayout,
|
||||
DefaultLayout,
|
||||
GuideLayout
|
||||
} from './src/components/layouts';
|
||||
|
||||
const store = createStore();
|
||||
|
||||
@ -35,6 +38,9 @@ export const wrapPageElement = ({ element, props }) => {
|
||||
</DefaultLayout>
|
||||
);
|
||||
}
|
||||
if (/^\/certification(\/.*)*/.test(pathname)) {
|
||||
return <CertificationLayout>{element}</CertificationLayout>;
|
||||
}
|
||||
if (/^\/guide(\/.*)*/.test(pathname)) {
|
||||
return (
|
||||
<DefaultLayout>
|
||||
|
11
client/src/components/layouts/Certification.js
Normal file
11
client/src/components/layouts/Certification.js
Normal file
@ -0,0 +1,11 @@
|
||||
import React, { Fragment } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
function CertificationLayout({ children }) {
|
||||
return <Fragment>{children}</Fragment>;
|
||||
}
|
||||
|
||||
CertificationLayout.displayName = 'CertificationLayout';
|
||||
CertificationLayout.propTypes = { children: PropTypes.any };
|
||||
|
||||
export default CertificationLayout;
|
4
client/src/components/layouts/index.js
Normal file
4
client/src/components/layouts/index.js
Normal file
@ -0,0 +1,4 @@
|
||||
export { default as CertificationLayout } from './Certification';
|
||||
export { default as DefaultLayout } from './Default';
|
||||
export { default as GuideLayout } from './Guide';
|
||||
export { default as LearnLayout } from './Learn';
|
Reference in New Issue
Block a user