From 2155550fa36a3bc3c8f66e0926530123b4018cd4 Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Mon, 16 May 2022 12:46:38 +0200 Subject: refactor: use custom hook for breadcrumb items and schema --- src/components/templates/sectioned/sectioned-layout.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/components/templates/sectioned/sectioned-layout.tsx') 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; -export type SectionedLayoutProps = { +export type SectionedLayoutProps = Pick & { /** * An array of objects describing each section. */ @@ -19,7 +19,7 @@ export type SectionedLayoutProps = { * * Render a sectioned layout. */ -const SectionedLayout: FC = ({ sections }) => { +const SectionedLayout: FC = ({ 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 = ({ sections }) => { }); }; - return {getSections(sections)}; + return {getSections(sections)}; }; export default SectionedLayout; -- cgit v1.2.3