From be8e330d4c769cd324c25c0711e299cf6c253dbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Let=C3=ADcia=20Camara?= Date: Thu, 18 Oct 2018 17:29:27 -0300 Subject: [PATCH] Add all public info to merchant map pin popup --- src/components/pages/AmbassadorsPage.js | 6 +++++- src/components/pages/MerchantsPage.js | 12 ++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/components/pages/AmbassadorsPage.js b/src/components/pages/AmbassadorsPage.js index 4e2644d..6a9b9aa 100644 --- a/src/components/pages/AmbassadorsPage.js +++ b/src/components/pages/AmbassadorsPage.js @@ -184,12 +184,16 @@ class AmbassadorsPage extends Component { }); const markers = result.data.map(merchant => { + const infoDescription =
+
Address: {merchant.address}
+ {(merchant.phone) && (
Phone: {merchant.phone}
)} +
; const marker = { lat: merchant.lat, lng: merchant.lon, withInfo: true, infoTitle: merchant.name, - infoDescription: `${merchant.address}, ${merchant.city} - ${merchant.country}`, + infoDescription: infoDescription, }; return marker; }); diff --git a/src/components/pages/MerchantsPage.js b/src/components/pages/MerchantsPage.js index c0dc707..6fcf1a0 100644 --- a/src/components/pages/MerchantsPage.js +++ b/src/components/pages/MerchantsPage.js @@ -182,6 +182,10 @@ class MerchantsPage extends Component { }); result.data.map(merchant => { + const infoDescription =
+
Address: {merchant.address}
+ {(merchant.phone) && (
Phone: {merchant.phone}
)} +
; merchant.map =