aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/templates/sectioned/sectioned-layout.tsx
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2022-05-16 12:46:38 +0200
committerArmand Philippot <git@armandphilippot.com>2022-05-16 12:46:38 +0200
commit2155550fa36a3bc3c8f66e0926530123b4018cd4 (patch)
tree1b7472d7ceeb9c95b2c6de6440b48b94405e155e /src/components/templates/sectioned/sectioned-layout.tsx
parent8a55aa83bd4b64d1d989cb49b7d9c3fdc1cc6ea5 (diff)
refactor: use custom hook for breadcrumb items and schema
Diffstat (limited to 'src/components/templates/sectioned/sectioned-layout.tsx')
-rw-r--r--src/components/templates/sectioned/sectioned-layout.tsx8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/components/templates/sectioned/sectioned-layout.tsx b/src/components/templates/sectioned/sectioned-layout.tsx
index 36ca039..58d5ad0 100644
--- a/src/components/templates/sectioned/sectioned-layout.tsx
+++ b/src/components/templates/sectioned/sectioned-layout.tsx
@@ -3,11 +3,11 @@ import Section, {
type SectionVariant,
} from '@components/atoms/layout/section';
import { FC } from 'react';
-import Layout from '../layout/layout';
+import Layout, { type LayoutProps } from '../layout/layout';
export type Section = Pick<SectionProps, 'content' | 'title'>;
-export type SectionedLayoutProps = {
+export type SectionedLayoutProps = Pick<LayoutProps, 'breadcrumbSchema'> & {
/**
* An array of objects describing each section.
*/
@@ -19,7 +19,7 @@ export type SectionedLayoutProps = {
*
* Render a sectioned layout.
*/
-const SectionedLayout: FC<SectionedLayoutProps> = ({ sections }) => {
+const SectionedLayout: FC<SectionedLayoutProps> = ({ sections, ...props }) => {
const getSections = (items: SectionProps[]) => {
return items.map((section, index) => {
const variant: SectionVariant = index % 2 ? 'light' : 'dark';
@@ -37,7 +37,7 @@ const SectionedLayout: FC<SectionedLayoutProps> = ({ sections }) => {
});
};
- return <Layout>{getSections(sections)}</Layout>;
+ return <Layout {...props}>{getSections(sections)}</Layout>;
};
export default SectionedLayout;