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/index.tsx | |
| parent | 67ce6cc19cbfdf9692dc785d2fc88ecee4ed500c (diff) | |
chore(i18n): replace i18n provider and helpers
Diffstat (limited to 'src/pages/index.tsx')
| -rw-r--r-- | src/pages/index.tsx | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/src/pages/index.tsx b/src/pages/index.tsx index ae5fe4b..264c45a 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -1,18 +1,18 @@ -import type { ReactElement } from 'react'; -import { GetStaticProps, GetStaticPropsContext } from 'next'; -import Head from 'next/head'; +import FeedIcon from '@assets/images/icon-feed.svg'; +import { ButtonLink } from '@components/Buttons'; +import { ContactIcon } from '@components/Icons'; import Layout from '@components/Layouts/Layout'; import { seo } from '@config/seo'; -import { NextPageWithLayout } from '@ts/types/app'; -import { defaultLocale, loadTranslation } from '@utils/helpers/i18n'; +import { config } from '@config/website'; import HomePageContent from '@content/pages/homepage.mdx'; -import { ButtonLink } from '@components/Buttons'; -import styles from '@styles/pages/Home.module.scss'; import { t } from '@lingui/macro'; -import FeedIcon from '@assets/images/icon-feed.svg'; -import { ContactIcon } from '@components/Icons'; +import styles from '@styles/pages/Home.module.scss'; +import { NextPageWithLayout } from '@ts/types/app'; +import { loadTranslation } from '@utils/helpers/i18n'; +import { GetStaticProps, GetStaticPropsContext } from 'next'; +import Head from 'next/head'; +import type { ReactElement } from 'react'; import { Graph, WebPage } from 'schema-dts'; -import { config } from '@config/website'; const Home: NextPageWithLayout = () => { const CodingLinks = () => { @@ -141,11 +141,10 @@ export const getStaticProps: GetStaticProps = async ( context: GetStaticPropsContext ) => { const { locale } = context; - const translation = await loadTranslation(locale || defaultLocale); + const translation = await loadTranslation(locale); return { props: { - locale, translation, }, }; |
