From 8e57fb30bf73b51de78805215f1f34f51125df39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Let=C3=ADcia=20Camara?= Date: Sun, 11 Nov 2018 17:59:08 -0200 Subject: [PATCH] Add phone, clicable website and telegram to /merchants --- src/components/pages/MerchantsPage.js | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/components/pages/MerchantsPage.js b/src/components/pages/MerchantsPage.js index 4875c04..891c5d8 100644 --- a/src/components/pages/MerchantsPage.js +++ b/src/components/pages/MerchantsPage.js @@ -54,9 +54,11 @@ const mapsStyles = { const columnData = [ { id: 'name', numeric: false, disablePadding: true, label: 'Name' }, - { id: 'phone', numeric: false, disablePadding: true, label: 'Contact' }, { id: 'address', numeric: false, disablePadding: true, label: 'Address' }, - { id: 'location', numeric: false, disablePadding: false, label: 'Location' }, + { id: 'phone', numeric: false, disablePadding: true, label: 'Phone' }, + { id: 'link', numeric: false, disablePadding: false, label: 'Website' }, + { id: 'telegram', numeric: false, disablePadding: true, label: 'telegram' }, + { id: 'website', numeric: false, disablePadding: true, label: 'website' }, { id: 'map', numeric: false, disablePadding: false, label: 'Maps', disableSearch: true} ]; @@ -204,10 +206,13 @@ class MerchantsPage extends Component {
Address: {merchant.address}
{(merchant.phone) && (
Phone: {merchant.phone}
)} ; - merchant.location = { - searchText: `${merchant.country} - ${merchant.city}`, - value: (merchant.city) ? `${merchant.city} - ${merchant.country}`: merchant.country - } + merchant.link = { + searchText: stripProtocol(merchant.website), + value: ( + {stripProtocol(merchant.website)} + ) + }; merchant.map =