diff options
| author | Armand Philippot <git@armandphilippot.com> | 2021-12-21 14:29:19 +0100 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2021-12-21 14:29:19 +0100 |
| commit | a367f605b842ad0a71a63025da15ac62ed0364a5 (patch) | |
| tree | b15150fbe219d1905b98570ebafb5063d0ade1b1 /src/components/Layouts | |
| parent | 6092ad0c91e0dc268e5988174db87ded14e6c931 (diff) | |
chore: add a breadcrumb component
Diffstat (limited to 'src/components/Layouts')
| -rw-r--r-- | src/components/Layouts/Layout.tsx | 14 |
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; |
