Merge pull request #319 from stigrune/master

Fixed invalid Telegram contact url
This commit is contained in:
Victor Zhou 2019-07-25 10:02:59 -04:00 committed by GitHub
commit 03cdea6852
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 11 additions and 11 deletions

View File

@ -122,7 +122,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

@ -108,7 +108,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

@ -111,7 +111,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

@ -111,7 +111,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

@ -111,7 +111,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

@ -111,7 +111,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

@ -111,7 +111,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

@ -111,7 +111,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

@ -111,7 +111,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('#');
}); });