-
Notifications
You must be signed in to change notification settings - Fork 48
/
social-media.tsx
43 lines (39 loc) · 1.12 KB
/
social-media.tsx
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
// A module for handling social media.
import { SocialMediaProps } from '@ircsignpost/signpost-base/dist/src/header-banner';
import facebookImage from '../public/facebook.svg';
import messengerImage from '../public/messenger.svg';
import whatsappImage from '../public/whatsapp.svg';
export interface SocialMediaLink {
title: string;
href: string;
}
// Serializable social media links
export interface SocialMediaLinks {
facebookLink: SocialMediaLink;
whatsappLink: SocialMediaLink;
messengerLink: SocialMediaLink;
}
/**
* Provides data for Social Media buttons, e.g. Facebook, Whatsapp, etc.
*
* TODO: You might need to add new Social media buttons or remove Facebook/Whatsapp/Messenger.
* If so, import social media icons (or remove unused ones) under public/ dir.
*/
export function getSocialMediaProps(
socialMediaLinks: SocialMediaLinks
): SocialMediaProps[] {
return [
{
...socialMediaLinks.facebookLink,
image: facebookImage,
},
{
...socialMediaLinks.whatsappLink,
image: whatsappImage,
},
{
...socialMediaLinks.messengerLink,
image: messengerImage,
},
];
}