aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/Layouts/Layout.tsx
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2021-12-21 14:29:19 +0100
committerArmand Philippot <git@armandphilippot.com>2021-12-21 14:29:19 +0100
commita367f605b842ad0a71a63025da15ac62ed0364a5 (patch)
treeb15150fbe219d1905b98570ebafb5063d0ade1b1 /src/components/Layouts/Layout.tsx
parent6092ad0c91e0dc268e5988174db87ded14e6c931 (diff)
chore: add a breadcrumb component
Diffstat (limited to 'src/components/Layouts/Layout.tsx')
-rw-r--r--src/components/Layouts/Layout.tsx14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/components/Layouts/Layout.tsx b/src/components/Layouts/Layout.tsx
index 7f8ab9d..8c5570f 100644
--- a/src/components/Layouts/Layout.tsx
+++ b/src/components/Layouts/Layout.tsx
@@ -1,7 +1,8 @@
-import { ReactNode } from 'react';
+import { ReactElement, ReactNode } from 'react';
import Footer from '@components/Footer/Footer';
import Header from '@components/Header/Header';
import Main from '@components/Main/Main';
+import Breadcrumb from '@components/Breadcrumb/Breadcrumb';
const Layout = ({
children,
@@ -19,4 +20,15 @@ const Layout = ({
);
};
+export const getLayout = (page: ReactElement) => {
+ const pageTitle: string = page.props.breadcrumbTitle;
+
+ return (
+ <Layout>
+ <Breadcrumb pageTitle={pageTitle} />
+ {page}
+ </Layout>
+ );
+};
+
export default Layout;