From 0e60743d140aff66eca6df712f653ee20f5d4ef3 Mon Sep 17 00:00:00 2001
From: Armand Philippot <git@armandphilippot.com>
Date: Tue, 3 Oct 2023 19:36:03 +0200
Subject: refactor(components): rewrite SocialLink component

* replace default label with a label prop
* rename name prop to icon prop
---
 src/pages/cv.tsx | 34 +++++++++++++++++++++++++++++++---
 1 file changed, 31 insertions(+), 3 deletions(-)

(limited to 'src/pages/cv.tsx')

diff --git a/src/pages/cv.tsx b/src/pages/cv.tsx
index b23c7a2..84a1bb9 100644
--- a/src/pages/cv.tsx
+++ b/src/pages/cv.tsx
@@ -179,6 +179,22 @@ const CVPage: NextPageWithLayout = () => {
     }
   );
 
+  const githubLabel = intl.formatMessage({
+    defaultMessage: 'Github profile',
+    description: 'CVPage: Github profile link',
+    id: 'Jm0a6H',
+  });
+  const gitlabLabel = intl.formatMessage({
+    defaultMessage: 'Gitlab profile',
+    description: 'CVPage: Gitlab profile link',
+    id: '++U2Hm',
+  });
+  const linkedinLabel = intl.formatMessage({
+    defaultMessage: 'LinkedIn profile',
+    description: 'CVPage: LinkedIn profile link',
+    id: 'Sm2wCk',
+  });
+
   const widgets = [
     <ImageWidget
       // eslint-disable-next-line react/jsx-no-literals -- Key allowed
@@ -196,10 +212,22 @@ const CVPage: NextPageWithLayout = () => {
       title={socialMediaTitle}
       level={2}
       media={[
-        { name: 'Github', url: PERSONAL_LINKS.GITHUB },
-        { name: 'Gitlab', url: PERSONAL_LINKS.GITLAB },
         {
-          name: 'LinkedIn',
+          icon: 'Github',
+          id: 'github',
+          label: githubLabel,
+          url: PERSONAL_LINKS.GITHUB,
+        },
+        {
+          icon: 'Gitlab',
+          id: 'gitlab',
+          label: gitlabLabel,
+          url: PERSONAL_LINKS.GITLAB,
+        },
+        {
+          icon: 'LinkedIn',
+          id: 'linkedin',
+          label: linkedinLabel,
           url: PERSONAL_LINKS.LINKEDIN,
         },
       ]}
-- 
cgit v1.2.3

