import { t } from '@lingui/macro'; import Head from 'next/head'; import Link from 'next/link'; import { useRouter } from 'next/router'; import styles from './Breadcrumb.module.scss'; const Breadcrumb = ({ pageTitle }: { pageTitle: string }) => { const router = useRouter(); const isHome = router.pathname === '/'; const isArticle = router.pathname.includes('/article/'); const isThematic = router.pathname.includes('/thematique/'); const isSubject = router.pathname.includes('/sujet/'); const getItems = () => { return ( <>
  • {t`Home`}
  • {(isArticle || isThematic || isSubject) && ( <>
  • {t`Blog`}
  • )} ); }; return ( <> {!isHome && ( )} ); }; export default Breadcrumb;