diff options
Diffstat (limited to 'src/components')
| -rw-r--r-- | src/components/Breadcrumb/Breadcrumb.tsx | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/src/components/Breadcrumb/Breadcrumb.tsx b/src/components/Breadcrumb/Breadcrumb.tsx index 0b9977e..7c8eb5c 100644 --- a/src/components/Breadcrumb/Breadcrumb.tsx +++ b/src/components/Breadcrumb/Breadcrumb.tsx @@ -11,8 +11,9 @@ const Breadcrumb = ({ pageTitle }: { pageTitle: string }) => { const isHome = router.pathname === '/'; const isArticle = router.pathname.includes('/article/'); - const isThematic = router.pathname.includes('/thematique/'); + const isProject = router.pathname.includes('/projet/'); const isSubject = router.pathname.includes('/sujet/'); + const isThematic = router.pathname.includes('/thematique/'); const getItems = () => { return ( @@ -31,6 +32,15 @@ const Breadcrumb = ({ pageTitle }: { pageTitle: string }) => { </li> </> )} + {isProject && ( + <> + <li className={styles.item}> + <Link href="/projets"> + <a>{t`Projects`}</a> + </Link> + </li> + </> + )} <li className="screen-reader-text">{pageTitle}</li> </> ); @@ -58,6 +68,17 @@ const Breadcrumb = ({ pageTitle }: { pageTitle: string }) => { items.push(blog); } + if (isProject) { + const blog: BreadcrumbList['itemListElement'] = { + '@type': 'ListItem', + position: 2, + name: t`Projects`, + item: `${config.url}/projets`, + }; + + items.push(blog); + } + const currentPage: BreadcrumbList['itemListElement'] = { '@type': 'ListItem', position: items.length + 1, |
