From 0e60743d140aff66eca6df712f653ee20f5d4ef3 Mon Sep 17 00:00:00 2001 From: Armand Philippot 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/contact.tsx | 33 ++++++++++++++++++++++++++++++--- 1 file changed, 30 insertions(+), 3 deletions(-) (limited to 'src/pages/contact.tsx') diff --git a/src/pages/contact.tsx b/src/pages/contact.tsx index 679896c..519bcac 100644 --- a/src/pages/contact.tsx +++ b/src/pages/contact.tsx @@ -65,6 +65,21 @@ const ContactPage: NextPageWithLayout = () => { title, }); const schemaJsonLd = getSchemaJson([webpageSchema, contactSchema]); + const githubLabel = intl.formatMessage({ + defaultMessage: 'Github profile', + description: 'ContactPage: Github profile link', + id: '75FYp7', + }); + const gitlabLabel = intl.formatMessage({ + defaultMessage: 'Gitlab profile', + description: 'ContactPage: Gitlab profile link', + id: '1V3CJf', + }); + const linkedinLabel = intl.formatMessage({ + defaultMessage: 'LinkedIn profile', + description: 'ContactPage: LinkedIn profile link', + id: 'Q3oEQn', + }); const widgets = [ { title={socialMediaTitle} level={2} media={[ - { name: 'Github', url: 'https://github.com/ArmandPhilippot' }, - { name: 'Gitlab', url: 'https://gitlab.com/ArmandPhilippot' }, { - name: 'LinkedIn', + icon: 'Github', + id: 'github', + label: githubLabel, + url: 'https://github.com/ArmandPhilippot', + }, + { + icon: 'Gitlab', + id: 'gitlab', + label: gitlabLabel, + url: 'https://gitlab.com/ArmandPhilippot', + }, + { + icon: 'LinkedIn', + id: 'linkedin', + label: linkedinLabel, url: 'https://www.linkedin.com/in/armandphilippot', }, ]} -- cgit v1.2.3 s/src/components/Footer/Footer.tsx?h=v1.0.0'>stats
blob: 4aa980d6cb51e931c331d9fc97a085700a6a2dcb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53