From 8737090d05db49a57b2c1e4fc46131aba7bbe582 Mon Sep 17 00:00:00 2001 From: Stig Rune Date: Wed, 24 Jul 2019 22:39:06 +0200 Subject: [PATCH] Fixed invalid telegram contact url --- .../Sidebar/Contacts/__snapshots__/Contacts.test.js.snap | 2 +- src/components/Sidebar/__snapshots__/Sidebar.test.js.snap | 2 +- .../__snapshots__/categories-list-template.test.js.snap | 2 +- src/templates/__snapshots__/category-template.test.js.snap | 2 +- src/templates/__snapshots__/index-template.test.js.snap | 2 +- src/templates/__snapshots__/not-found-template.test.js.snap | 2 +- src/templates/__snapshots__/page-template.test.js.snap | 2 +- src/templates/__snapshots__/tag-template.test.js.snap | 2 +- src/templates/__snapshots__/tags-list-template.test.js.snap | 2 +- src/utils/get-contact-href.js | 2 +- src/utils/get-contact-href.test.js | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/components/Sidebar/Contacts/__snapshots__/Contacts.test.js.snap b/src/components/Sidebar/Contacts/__snapshots__/Contacts.test.js.snap index 8613220..1c74c6e 100644 --- a/src/components/Sidebar/Contacts/__snapshots__/Contacts.test.js.snap +++ b/src/components/Sidebar/Contacts/__snapshots__/Contacts.test.js.snap @@ -107,7 +107,7 @@ exports[`Contacts renders correctly 1`] = ` > diff --git a/src/components/Sidebar/__snapshots__/Sidebar.test.js.snap b/src/components/Sidebar/__snapshots__/Sidebar.test.js.snap index 54751fe..a5e47f3 100644 --- a/src/components/Sidebar/__snapshots__/Sidebar.test.js.snap +++ b/src/components/Sidebar/__snapshots__/Sidebar.test.js.snap @@ -105,7 +105,7 @@ exports[`Sidebar renders correctly 1`] = ` > diff --git a/src/templates/__snapshots__/categories-list-template.test.js.snap b/src/templates/__snapshots__/categories-list-template.test.js.snap index 65531cd..1e575a0 100644 --- a/src/templates/__snapshots__/categories-list-template.test.js.snap +++ b/src/templates/__snapshots__/categories-list-template.test.js.snap @@ -108,7 +108,7 @@ exports[`CategoriesListTemplate renders correctly 1`] = ` > diff --git a/src/templates/__snapshots__/category-template.test.js.snap b/src/templates/__snapshots__/category-template.test.js.snap index 3660394..0943d7c 100644 --- a/src/templates/__snapshots__/category-template.test.js.snap +++ b/src/templates/__snapshots__/category-template.test.js.snap @@ -108,7 +108,7 @@ exports[`CategoryTemplate renders correctly 1`] = ` > diff --git a/src/templates/__snapshots__/index-template.test.js.snap b/src/templates/__snapshots__/index-template.test.js.snap index dae8a07..dfdbf03 100644 --- a/src/templates/__snapshots__/index-template.test.js.snap +++ b/src/templates/__snapshots__/index-template.test.js.snap @@ -108,7 +108,7 @@ exports[`IndexTemplate renders correctly 1`] = ` > diff --git a/src/templates/__snapshots__/not-found-template.test.js.snap b/src/templates/__snapshots__/not-found-template.test.js.snap index 79a74a4..61ce146 100644 --- a/src/templates/__snapshots__/not-found-template.test.js.snap +++ b/src/templates/__snapshots__/not-found-template.test.js.snap @@ -108,7 +108,7 @@ exports[`NotFoundTemplate renders correctly 1`] = ` > diff --git a/src/templates/__snapshots__/page-template.test.js.snap b/src/templates/__snapshots__/page-template.test.js.snap index 45ecb41..860ad34 100644 --- a/src/templates/__snapshots__/page-template.test.js.snap +++ b/src/templates/__snapshots__/page-template.test.js.snap @@ -108,7 +108,7 @@ exports[`PageTemplate renders correctly 1`] = ` > diff --git a/src/templates/__snapshots__/tag-template.test.js.snap b/src/templates/__snapshots__/tag-template.test.js.snap index bd95cfa..0592c2e 100644 --- a/src/templates/__snapshots__/tag-template.test.js.snap +++ b/src/templates/__snapshots__/tag-template.test.js.snap @@ -108,7 +108,7 @@ exports[`TagTemplate renders correctly 1`] = ` > diff --git a/src/templates/__snapshots__/tags-list-template.test.js.snap b/src/templates/__snapshots__/tags-list-template.test.js.snap index 428c16b..9ad18e8 100644 --- a/src/templates/__snapshots__/tags-list-template.test.js.snap +++ b/src/templates/__snapshots__/tags-list-template.test.js.snap @@ -108,7 +108,7 @@ exports[`TagsListTemplate renders correctly 1`] = ` > diff --git a/src/utils/get-contact-href.js b/src/utils/get-contact-href.js index c310560..2114db8 100644 --- a/src/utils/get-contact-href.js +++ b/src/utils/get-contact-href.js @@ -13,7 +13,7 @@ const getContactHref = (name: string, contact: string) => { href = `https://vk.com/${contact}`; break; case 'telegram': - href = `telegram:${contact}`; + href = `https://t.me/${contact}`; break; case 'email': href = `mailto:${contact}`; diff --git a/src/utils/get-contact-href.test.js b/src/utils/get-contact-href.test.js index 1cf3097..0787123 100644 --- a/src/utils/get-contact-href.test.js +++ b/src/utils/get-contact-href.test.js @@ -6,6 +6,6 @@ test('getContactHref', () => { expect(getContactHref('github', '#')).toBe('https://github.com/#'); expect(getContactHref('email', '#')).toBe('mailto:#'); expect(getContactHref('vkontakte', '#')).toBe('https://vk.com/#'); - expect(getContactHref('telegram', '#')).toBe('telegram:#'); + expect(getContactHref('telegram', '#')).toBe('https://t.me/#'); expect(getContactHref('rss', '#')).toBe('#'); });