Fixed invalid telegram contact url

This commit is contained in:
Stig Rune 2019-07-24 22:39:06 +02:00
parent d1aa92184e
commit 8737090d05
11 changed files with 11 additions and 11 deletions

View File

@ -107,7 +107,7 @@ exports[`Contacts renders correctly 1`] = `
> >
<a <a
className="contacts__list-item-link" className="contacts__list-item-link"
href="telegram:#" href="https://t.me/#"
rel="noopener noreferrer" rel="noopener noreferrer"
target="_blank" target="_blank"
> >

View File

@ -105,7 +105,7 @@ exports[`Sidebar renders correctly 1`] = `
> >
<a <a
className="contacts__list-item-link" className="contacts__list-item-link"
href="telegram:#" href="https://t.me/#"
rel="noopener noreferrer" rel="noopener noreferrer"
target="_blank" target="_blank"
> >

View File

@ -108,7 +108,7 @@ exports[`CategoriesListTemplate renders correctly 1`] = `
> >
<a <a
className="contacts__list-item-link" className="contacts__list-item-link"
href="telegram:#" href="https://t.me/#"
rel="noopener noreferrer" rel="noopener noreferrer"
target="_blank" target="_blank"
> >

View File

@ -108,7 +108,7 @@ exports[`CategoryTemplate renders correctly 1`] = `
> >
<a <a
className="contacts__list-item-link" className="contacts__list-item-link"
href="telegram:#" href="https://t.me/#"
rel="noopener noreferrer" rel="noopener noreferrer"
target="_blank" target="_blank"
> >

View File

@ -108,7 +108,7 @@ exports[`IndexTemplate renders correctly 1`] = `
> >
<a <a
className="contacts__list-item-link" className="contacts__list-item-link"
href="telegram:#" href="https://t.me/#"
rel="noopener noreferrer" rel="noopener noreferrer"
target="_blank" target="_blank"
> >

View File

@ -108,7 +108,7 @@ exports[`NotFoundTemplate renders correctly 1`] = `
> >
<a <a
className="contacts__list-item-link" className="contacts__list-item-link"
href="telegram:#" href="https://t.me/#"
rel="noopener noreferrer" rel="noopener noreferrer"
target="_blank" target="_blank"
> >

View File

@ -108,7 +108,7 @@ exports[`PageTemplate renders correctly 1`] = `
> >
<a <a
className="contacts__list-item-link" className="contacts__list-item-link"
href="telegram:#" href="https://t.me/#"
rel="noopener noreferrer" rel="noopener noreferrer"
target="_blank" target="_blank"
> >

View File

@ -108,7 +108,7 @@ exports[`TagTemplate renders correctly 1`] = `
> >
<a <a
className="contacts__list-item-link" className="contacts__list-item-link"
href="telegram:#" href="https://t.me/#"
rel="noopener noreferrer" rel="noopener noreferrer"
target="_blank" target="_blank"
> >

View File

@ -108,7 +108,7 @@ exports[`TagsListTemplate renders correctly 1`] = `
> >
<a <a
className="contacts__list-item-link" className="contacts__list-item-link"
href="telegram:#" href="https://t.me/#"
rel="noopener noreferrer" rel="noopener noreferrer"
target="_blank" target="_blank"
> >

View File

@ -13,7 +13,7 @@ const getContactHref = (name: string, contact: string) => {
href = `https://vk.com/${contact}`; href = `https://vk.com/${contact}`;
break; break;
case 'telegram': case 'telegram':
href = `telegram:${contact}`; href = `https://t.me/${contact}`;
break; break;
case 'email': case 'email':
href = `mailto:${contact}`; href = `mailto:${contact}`;

View File

@ -6,6 +6,6 @@ test('getContactHref', () => {
expect(getContactHref('github', '#')).toBe('https://github.com/#'); expect(getContactHref('github', '#')).toBe('https://github.com/#');
expect(getContactHref('email', '#')).toBe('mailto:#'); expect(getContactHref('email', '#')).toBe('mailto:#');
expect(getContactHref('vkontakte', '#')).toBe('https://vk.com/#'); expect(getContactHref('vkontakte', '#')).toBe('https://vk.com/#');
expect(getContactHref('telegram', '#')).toBe('telegram:#'); expect(getContactHref('telegram', '#')).toBe('https://t.me/#');
expect(getContactHref('rss', '#')).toBe('#'); expect(getContactHref('rss', '#')).toBe('#');
}); });