From a367f605b842ad0a71a63025da15ac62ed0364a5 Mon Sep 17 00:00:00 2001
From: Armand Philippot <git@armandphilippot.com>
Date: Tue, 21 Dec 2021 14:29:19 +0100
Subject: chore: add a breadcrumb component

---
 src/components/Layouts/Layout.tsx | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

(limited to 'src/components/Layouts/Layout.tsx')

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;
-- 
cgit v1.2.3

