From cda1052c533bca055553550394e326c28bd65bb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Let=C3=ADcia=20Camara?= Date: Mon, 29 Oct 2018 14:02:41 -0300 Subject: [PATCH] Add telegram hyperlink at ambassador map pin --- src/components/pages/AmbassadorsPage.js | 17 ++++++++++++++--- src/components/pages/MerchantsPage.js | 8 +++++++- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/src/components/pages/AmbassadorsPage.js b/src/components/pages/AmbassadorsPage.js index 74b8d4e..07b8b16 100644 --- a/src/components/pages/AmbassadorsPage.js +++ b/src/components/pages/AmbassadorsPage.js @@ -138,6 +138,7 @@ class AmbassadorsPage extends Component { searchText: app.addLocationSearchText(ambassador.cities), value: app.addLocation(ambassador.cities) } + ambassador.telegram_original = ambassador.telegram; ambassador.telegram = { searchText: ambassador.telegram, value: ( @@ -147,7 +148,7 @@ class AmbassadorsPage extends Component { rel="noopener noreferrer" >{ambassador.telegram} ) - } + }; ambassador.map = app.addMapButton(ambassador, ambassador.cities); ambassador.link = {stripProtocol(ambassador.url)}; @@ -266,7 +267,13 @@ class AmbassadorsPage extends Component { const infoDescription =
Location: {(location.name).replace(/(^|\s)\S/g, l => l.toUpperCase())} - {countries.getName(location.country)}
{(ambassador.nickname) && (
Nickname: {ambassador.nickname}
)} - {(ambassador.telegram) && (
Telegram: {ambassador.telegram}
)} + {(ambassador.telegram_original) && (
Telegram: + {ambassador.telegram_original} +
)} {(ambassador.keybase) && (
Keybase: {ambassador.keybase}
)} {(ambassador.email) && (
Email: {ambassador.email}
)} {(ambassador.phone) && (
Phone: {ambassador.phone}
)} @@ -312,7 +319,11 @@ class AmbassadorsPage extends Component { const infoDescription =
Location: {(city.name).replace(/(^|\s)\S/g, l => l.toUpperCase())} - {countries.getName(city.country)}
{(ambassador.nickname) && (
Nickname: {ambassador.nickname}
)} - {(ambassador.telegram) && (
Telegram: {ambassador.telegram}
)} + {(ambassador.telegram_original) && (
Telegram: {ambassador.telegram_original}
)} {(ambassador.keybase) && (
Keybase: {ambassador.keybase}
)} {(ambassador.email) && (
Email: {ambassador.email}
)} {(ambassador.phone) && (
Phone: {ambassador.phone}
)} diff --git a/src/components/pages/MerchantsPage.js b/src/components/pages/MerchantsPage.js index d58891c..1c0170d 100644 --- a/src/components/pages/MerchantsPage.js +++ b/src/components/pages/MerchantsPage.js @@ -138,7 +138,13 @@ class MerchantsPage extends Component { const infoDescription =
Location: {(city.name).replace(/(^|\s)\S/g, l => l.toUpperCase())} - {countries.getName(city.country)}
{(ambassador.nickname) && (
Nickname: {ambassador.nickname}
)} - {(ambassador.telegram) && (
Telegram: {ambassador.telegram}
)} + {(ambassador.telegram) && (
Telegram: + {ambassador.telegram} +
)} {(ambassador.keybase) && (
Keybase: {ambassador.keybase}
)} {(ambassador.email) && (
Email: {ambassador.email}
)} {(ambassador.phone) && (
Phone: {ambassador.phone}
)}