mirror of
https://github.com/mastermindzh/rickvanlieshout.com
synced 2025-08-02 23:52:36 +02:00
Add youtube as a contact option
This commit is contained in:
@@ -39,6 +39,9 @@ const getContactHref = (name: string, contact: string) => {
|
||||
case 'codepen':
|
||||
href = `https://www.codepen.io/${contact}`;
|
||||
break;
|
||||
case 'youtube':
|
||||
href = `https://www.youtube.com/channel/${contact}`;
|
||||
break;
|
||||
default:
|
||||
href = contact;
|
||||
break;
|
||||
|
@@ -15,4 +15,5 @@ test('getContactHref', () => {
|
||||
expect(getContactHref('gitlab', '#')).toBe('https://www.gitlab.com/#');
|
||||
expect(getContactHref('weibo', '#')).toBe('https://www.weibo.com/#');
|
||||
expect(getContactHref('codepen', '#')).toBe('https://www.codepen.io/#');
|
||||
expect(getContactHref('youtube', '#')).toBe('https://www.youtube.com/channel/#');
|
||||
});
|
||||
|
@@ -44,6 +44,9 @@ const getIcon = (name: string) => {
|
||||
case 'codepen':
|
||||
icon = ICONS.CODEPEN;
|
||||
break;
|
||||
case 'youtube':
|
||||
icon = ICONS.YOUTUBE;
|
||||
break;
|
||||
default:
|
||||
icon = {};
|
||||
break;
|
||||
|
@@ -16,4 +16,5 @@ test('getIcon', () => {
|
||||
expect(getIcon('gitlab')).toEqual(ICONS.GITLAB);
|
||||
expect(getIcon('weibo')).toEqual(ICONS.WEIBO);
|
||||
expect(getIcon('codepen')).toEqual(ICONS.CODEPEN);
|
||||
expect(getIcon('youtube')).toEqual(ICONS.YOUTUBE);
|
||||
});
|
Reference in New Issue
Block a user