diff options
| author | Armand Philippot <git@armandphilippot.com> | 2022-05-20 15:37:08 +0200 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2022-05-20 15:37:08 +0200 |
| commit | f4c7ab4e306d2f04324853e67032d370abd65d0c (patch) | |
| tree | 2c7d1ad467d6c52bc134202f0d33f7524f9056fa /src/utils/hooks/use-breadcrumb.tsx | |
| parent | bbd63400f94b43fde04449e0c71d14763d893e6a (diff) | |
chore: handle blog pagination when JS is disabled
Diffstat (limited to 'src/utils/hooks/use-breadcrumb.tsx')
| -rw-r--r-- | src/utils/hooks/use-breadcrumb.tsx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/utils/hooks/use-breadcrumb.tsx b/src/utils/hooks/use-breadcrumb.tsx index 087d400..130ebf1 100644 --- a/src/utils/hooks/use-breadcrumb.tsx +++ b/src/utils/hooks/use-breadcrumb.tsx @@ -40,6 +40,7 @@ const useBreadcrumb = ({ const { website } = useSettings(); const isArticle = url.startsWith('/article/'); const isHome = url === '/'; + const isPageNumber = url.includes('/page/'); const isProject = url.startsWith('/projets/'); const isSearch = url.startsWith('/recherche'); const isThematic = url.startsWith('/thematique/'); @@ -62,7 +63,7 @@ const useBreadcrumb = ({ if (isHome) return { items, schema }; - if (isArticle || isSearch || isThematic || isTopic) { + if (isArticle || isPageNumber || isSearch || isThematic || isTopic) { const blogLabel = intl.formatMessage({ defaultMessage: 'Blog', description: 'Breadcrumb: blog label', |
