From e4d5b8151802517b2943756fc0d09ffa95e2c4e2 Mon Sep 17 00:00:00 2001
From: Armand Philippot <git@armandphilippot.com>
Date: Sat, 29 Jan 2022 18:21:37 +0100
Subject: chore: replace lingui functions with react-intl

---
 src/components/Branding/Branding.tsx | 24 +++++++++++++++---------
 1 file changed, 15 insertions(+), 9 deletions(-)

(limited to 'src/components/Branding/Branding.tsx')

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>
-- 
cgit v1.2.3

