diff options
| author | Armand Philippot <git@armandphilippot.com> | 2022-01-28 18:19:24 +0100 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2022-01-29 19:02:57 +0100 |
| commit | 47b854de26dea24e7838fd0804df103dee99635f (patch) | |
| tree | 28ceab6a0a127bab9024bb7e6997f9db73bd13d6 /src/pages/recherche/index.tsx | |
| parent | 67ce6cc19cbfdf9692dc785d2fc88ecee4ed500c (diff) | |
chore(i18n): replace i18n provider and helpers
Diffstat (limited to 'src/pages/recherche/index.tsx')
| -rw-r--r-- | src/pages/recherche/index.tsx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/pages/recherche/index.tsx b/src/pages/recherche/index.tsx index 7f410e8..c3c71f3 100644 --- a/src/pages/recherche/index.tsx +++ b/src/pages/recherche/index.tsx @@ -1,23 +1,23 @@ import { Button } from '@components/Buttons'; import { getLayout } from '@components/Layouts/Layout'; +import PaginationCursor from '@components/PaginationCursor/PaginationCursor'; import PostHeader from '@components/PostHeader/PostHeader'; import PostsList from '@components/PostsList/PostsList'; +import Sidebar from '@components/Sidebar/Sidebar'; +import Spinner from '@components/Spinner/Spinner'; +import { ThematicsList, TopicsList } from '@components/Widgets'; import { config } from '@config/website'; import { t } from '@lingui/macro'; import { getPublishedPosts } from '@services/graphql/queries'; +import styles from '@styles/pages/Page.module.scss'; import { NextPageWithLayout } from '@ts/types/app'; import { PostsList as PostsListData } from '@ts/types/blog'; +import { loadTranslation } from '@utils/helpers/i18n'; import { GetStaticProps, GetStaticPropsContext } from 'next'; import Head from 'next/head'; import { useRouter } from 'next/router'; import { useEffect, useRef, useState } from 'react'; import useSWRInfinite from 'swr/infinite'; -import Sidebar from '@components/Sidebar/Sidebar'; -import { ThematicsList, TopicsList } from '@components/Widgets'; -import styles from '@styles/pages/Page.module.scss'; -import Spinner from '@components/Spinner/Spinner'; -import PaginationCursor from '@components/PaginationCursor/PaginationCursor'; -import { defaultLocale, loadTranslation } from '@utils/helpers/i18n'; const Search: NextPageWithLayout = () => { const [query, setQuery] = useState(''); @@ -147,7 +147,7 @@ export const getStaticProps: GetStaticProps = async ( ) => { const breadcrumbTitle = t`Search`; const { locale } = context; - const translation = await loadTranslation(locale || defaultLocale); + const translation = await loadTranslation(locale); return { props: { |
