diff options
| author | Armand Philippot <git@armandphilippot.com> | 2022-01-29 19:03:59 +0100 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2022-01-29 19:03:59 +0100 |
| commit | 8fb5e4ef3ae925ebc6622711fb5c8c6147642cbc (patch) | |
| tree | 9e99137a7b64ea7993a8311a7162336a551be8b2 /src/components/Branding/Branding.tsx | |
| parent | 2bae7c43764df5678fe2fc2e68be11ae95d85a41 (diff) | |
| parent | e4d5b8151802517b2943756fc0d09ffa95e2c4e2 (diff) | |
feat(i18n): replace linguijs with formatjs
Diffstat (limited to 'src/components/Branding/Branding.tsx')
| -rw-r--r-- | src/components/Branding/Branding.tsx | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/src/components/Branding/Branding.tsx b/src/components/Branding/Branding.tsx index 01948e9..efb3a49 100644 --- a/src/components/Branding/Branding.tsx +++ b/src/components/Branding/Branding.tsx @@ -1,17 +1,18 @@ -import Image from 'next/image'; -import Link from 'next/link'; -import { ReactElement } from 'react'; -import { t } from '@lingui/macro'; import photo from '@assets/images/armand-philippot.jpg'; import { config } from '@config/website'; -import styles from './Branding.module.scss'; import Head from 'next/head'; +import Image from 'next/image'; +import Link from 'next/link'; +import { ReactElement } from 'react'; +import { useIntl } from 'react-intl'; import { Person, WithContext } from 'schema-dts'; +import styles from './Branding.module.scss'; import Logo from './Logo/Logo'; type BrandingReturn = ({ isHome }: { isHome: boolean }) => ReactElement; const Branding: BrandingReturn = ({ isHome = false }) => { + const intl = useIntl(); const TitleTag = isHome ? 'h1' : 'p'; const schemaJsonLd: WithContext<Person> = { @@ -38,10 +39,15 @@ const Branding: BrandingReturn = ({ isHome = false }) => { <div className={styles.logo__front}> <Image src={photo} - alt={t({ - message: `${config.name} picture`, - comment: 'Branding logo.', - })} + alt={intl.formatMessage( + { + defaultMessage: '{brandingName} picture', + description: 'Branding: branding name picture.', + }, + { + brandingName: config.name, + } + )} layout="responsive" /> </div> |
