Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed invalid Telegram contact url #319

Merged
merged 1 commit into from
Jul 25, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,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 @@ -105,7 +105,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 @@ -108,7 +108,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 @@ -108,7 +108,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 @@ -108,7 +108,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 @@ -108,7 +108,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 @@ -108,7 +108,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 @@ -108,7 +108,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 @@ -108,7 +108,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('#');
});