added phone number to contact info

This commit is contained in:
2022-10-09 16:12:27 +02:00
parent 9c0112d52f
commit 1c137af313
5 changed files with 11 additions and 3 deletions

View File

@@ -16,4 +16,5 @@ test("getContactHref", () => {
expect(getContactHref("soundcloud", "#")).toBe("https://soundcloud.com/#");
expect(getContactHref("instagram", "#")).toBe("https://www.instagram.com/#");
expect(getContactHref("linkedin", "#")).toBe("https://www.linkedin.com/in/#");
expect(getContactHref("phone", "+123")).toBe("tel:+123");
});

View File

@@ -15,6 +15,7 @@ const getContactHref = (name: string, contact: string) => {
instagram: `https://www.instagram.com/${contact}`,
linkedin: `https://www.linkedin.com/in/${contact}`,
youtube: `https://www.youtube.com/c/${contact}`,
phone: `tel:${contact}`,
};
return hrefs[name] ?? contact;