Skip to content

Commit

Permalink
Merge pull request #319 from stigrune/master
Browse files Browse the repository at this point in the history
Fixed invalid Telegram contact url
  • Loading branch information
vzhou842 authored Jul 25, 2019
2 parents fd435f2 + 8737090 commit 03cdea6
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ exports[`Contacts renders correctly 1`] = `
>
<a
className="contacts__list-item-link"
href="telegram:#"
href="https://t.me/#"
rel="noopener noreferrer"
target="_blank"
>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Sidebar/__snapshots__/Sidebar.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ exports[`Sidebar renders correctly 1`] = `
>
<a
className="contacts__list-item-link"
href="telegram:#"
href="https://t.me/#"
rel="noopener noreferrer"
target="_blank"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ exports[`CategoriesListTemplate renders correctly 1`] = `
>
<a
className="contacts__list-item-link"
href="telegram:#"
href="https://t.me/#"
rel="noopener noreferrer"
target="_blank"
>
Expand Down
2 changes: 1 addition & 1 deletion src/templates/__snapshots__/category-template.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ exports[`CategoryTemplate renders correctly 1`] = `
>
<a
className="contacts__list-item-link"
href="telegram:#"
href="https://t.me/#"
rel="noopener noreferrer"
target="_blank"
>
Expand Down
2 changes: 1 addition & 1 deletion src/templates/__snapshots__/index-template.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ exports[`IndexTemplate renders correctly 1`] = `
>
<a
className="contacts__list-item-link"
href="telegram:#"
href="https://t.me/#"
rel="noopener noreferrer"
target="_blank"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ exports[`NotFoundTemplate renders correctly 1`] = `
>
<a
className="contacts__list-item-link"
href="telegram:#"
href="https://t.me/#"
rel="noopener noreferrer"
target="_blank"
>
Expand Down
2 changes: 1 addition & 1 deletion src/templates/__snapshots__/page-template.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ exports[`PageTemplate renders correctly 1`] = `
>
<a
className="contacts__list-item-link"
href="telegram:#"
href="https://t.me/#"
rel="noopener noreferrer"
target="_blank"
>
Expand Down
2 changes: 1 addition & 1 deletion src/templates/__snapshots__/tag-template.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ exports[`TagTemplate renders correctly 1`] = `
>
<a
className="contacts__list-item-link"
href="telegram:#"
href="https://t.me/#"
rel="noopener noreferrer"
target="_blank"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ exports[`TagsListTemplate renders correctly 1`] = `
>
<a
className="contacts__list-item-link"
href="telegram:#"
href="https://t.me/#"
rel="noopener noreferrer"
target="_blank"
>
Expand Down
2 changes: 1 addition & 1 deletion src/utils/get-contact-href.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}`;
Expand Down
2 changes: 1 addition & 1 deletion src/utils/get-contact-href.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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('#');
});

0 comments on commit 03cdea6

Please sign in to comment.