Telegram opening link

This commit is contained in:
Letícia Camara 2018-11-11 18:20:49 -02:00
parent 8e57fb30bf
commit bc088fd427

View file

@ -206,6 +206,18 @@ class MerchantsPage extends Component {
<div><b>Address</b>: {merchant.address}</div> <div><b>Address</b>: {merchant.address}</div>
{(merchant.phone) && (<div><b>Phone</b>: {merchant.phone}</div>)} {(merchant.phone) && (<div><b>Phone</b>: {merchant.phone}</div>)}
</div>; </div>;
merchant.telegram_original = merchant.telegram;
merchant.telegram = {
searchText: merchant.telegram,
value: (
<a
href={`https://t.me/${(merchant.telegram.trim().charAt(0) === '@') ?
merchant.telegram.trim().slice(1): merchant.telegram.trim()}`}
target="_blank"
rel="noopener noreferrer"
>{merchant.telegram}</a>
)
};
merchant.link = { merchant.link = {
searchText: stripProtocol(merchant.website), searchText: stripProtocol(merchant.website),
value: ( value: (