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:
mrugesh mohapatra
2019-02-22 20:36:47 +05:30
committed by Ahmad Abdolsaheb
parent 163540f8fc
commit 293e58cc23
4 changed files with 31 additions and 4 deletions

View File

@ -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>

View File

@ -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>

View 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;

View 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';