From a367f605b842ad0a71a63025da15ac62ed0364a5 Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Tue, 21 Dec 2021 14:29:19 +0100 Subject: chore: add a breadcrumb component --- src/pages/recherche/index.tsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/pages/recherche/index.tsx') diff --git a/src/pages/recherche/index.tsx b/src/pages/recherche/index.tsx index 6de5816..b39d3f9 100644 --- a/src/pages/recherche/index.tsx +++ b/src/pages/recherche/index.tsx @@ -1,5 +1,5 @@ import { Button } from '@components/Buttons'; -import Layout from '@components/Layouts/Layout'; +import { getLayout } from '@components/Layouts/Layout'; import PostsList from '@components/PostsList/PostsList'; import { config } from '@config/website'; import { t } from '@lingui/macro'; @@ -10,7 +10,7 @@ import { loadTranslation } from '@utils/helpers/i18n'; import { GetStaticProps } from 'next'; import Head from 'next/head'; import { useRouter } from 'next/router'; -import { ReactElement, useEffect, useState } from 'react'; +import { useEffect, useState } from 'react'; import useSWRInfinite from 'swr/infinite'; const Search: NextPageWithLayout = () => { @@ -92,7 +92,7 @@ const Search: NextPageWithLayout = () => { ); }; -Search.getLayout = (page: ReactElement) => {page}; +Search.getLayout = getLayout; export const getStaticProps: GetStaticProps = async (context) => { const translation = await loadTranslation( @@ -100,8 +100,11 @@ export const getStaticProps: GetStaticProps = async (context) => { process.env.NODE_ENV === 'production' ); + const breadcrumbTitle = t`Search`; + return { props: { + breadcrumbTitle, translation, }, }; -- cgit v1.2.3