diff options
| author | Armand Philippot <git@armandphilippot.com> | 2022-05-16 12:46:38 +0200 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2022-05-16 12:46:38 +0200 |
| commit | 2155550fa36a3bc3c8f66e0926530123b4018cd4 (patch) | |
| tree | 1b7472d7ceeb9c95b2c6de6440b48b94405e155e /src/components/templates/page/page-layout.tsx | |
| parent | 8a55aa83bd4b64d1d989cb49b7d9c3fdc1cc6ea5 (diff) | |
refactor: use custom hook for breadcrumb items and schema
Diffstat (limited to 'src/components/templates/page/page-layout.tsx')
| -rw-r--r-- | src/components/templates/page/page-layout.tsx | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/components/templates/page/page-layout.tsx b/src/components/templates/page/page-layout.tsx index 4e4ff00..bc90f4c 100644 --- a/src/components/templates/page/page-layout.tsx +++ b/src/components/templates/page/page-layout.tsx @@ -25,7 +25,10 @@ import { useIntl } from 'react-intl'; import Layout, { type LayoutProps } from '../layout/layout'; import styles from './page-layout.module.scss'; -export type PageLayoutProps = { +export type PageLayoutProps = Pick< + LayoutProps, + 'breadcrumbSchema' | 'isHome' +> & { /** * True if the page accepts new comments. Default: false. */ @@ -59,10 +62,6 @@ export type PageLayoutProps = { */ intro?: PageHeaderProps['intro']; /** - * True if it is homepage. Default: false. - */ - isHome?: LayoutProps['isHome']; - /** * The page title. */ title: PageHeaderProps['title']; @@ -85,6 +84,7 @@ const PageLayout: FC<PageLayoutProps> = ({ children, allowComments = false, breadcrumb, + breadcrumbSchema, comments, footerMeta, headerMeta, @@ -170,6 +170,7 @@ const PageLayout: FC<PageLayoutProps> = ({ return ( <Layout + breadcrumbSchema={breadcrumbSchema} isHome={isHome} className={`${styles.article} ${styles[articleModifier]}`} > |
