Add telegram hyperlink with correct link

mx
Letícia Camara 2018-10-28 22:22:19 -03:00
parent 05c2a43bee
commit c5a2ea8b8f
2 changed files with 12 additions and 2 deletions

View File

@ -138,6 +138,16 @@ class AmbassadorsPage extends Component {
searchText: app.addLocationSearchText(ambassador.cities),
value: app.addLocation(ambassador.cities)
}
ambassador.telegram = {
searchText: ambassador.telegram,
value: (
<a
href={`https://t.me/${(ambassador.telegram.trim().charAt(0) === '@') ? ambassador.telegram.trim().slice(1): ambassador.telegram.trim()}`}
target="_blank"
rel="noopener noreferrer"
>{ambassador.telegram}</a>
)
}
ambassador.map = app.addMapButton(ambassador, ambassador.cities);
ambassador.link = <a target="_blank" rel="noopener noreferrer"
href={ambassador.url}>{stripProtocol(ambassador.url)}</a>;

View File

@ -2,8 +2,8 @@ import feathers from '@feathersjs/client';
const app = feathers();
// Change to your production ambassador web service
// const restClient = feathers.rest('http://localhost:3030');
const restClient = feathers.rest('https://palmpaybackend.leticiacamara.com');
const restClient = feathers.rest('http://localhost:3030');
// const restClient = feathers.rest('https://palmpaybackend.leticiacamara.com');
// Configure an Fetch AJAX library with that client. For fetch details see https://facebook.github.io/react-native/docs/network.html
// For rest details see https://docs.feathersjs.com/api/client/rest.html