all repos — caroster @ b746a19206f96980300f3051822e27c9a156887f

[Octree] Group carpool to your event https://caroster.io

:sparkles: add a button see on gmap on the event details
Hadrien Froger hadrien@octree.ch
Mon, 20 Jul 2020 07:27:22 +0100
commit

b746a19206f96980300f3051822e27c9a156887f

parent

053cf2d0c2c2b5b42ff1999541cc8c947ed4fdf0

2 files changed, 21 insertions(+), 2 deletions(-)

jump to
M app/src/containers/EventDetails/index.jsapp/src/containers/EventDetails/index.js

@@ -56,7 +56,22 @@ </Typography>

)} </div> <div className={classes.section}> - <Typography variant="h6">{t('event.fields.address')}</Typography> + <Typography variant="h6"> + {t('event.fields.address')} + {!isEditing && event.address && ( + <Button + href={`https://www.google.ch/maps/place/${encodeURI( + 'event.address' + )}`} + size="small" + color="primary" + className={classes.seeOnGMapButton} + id="SeeOnGoogleMap" + > + {t('event.actions.see_on_gmap')} + </Button> + )} + </Typography> {isEditing ? ( <TextField light

@@ -100,6 +115,9 @@ marginTop: theme.spacing(4),

}, map: { marginTop: theme.spacing(4), + }, + seeOnGMapButton: { + marginLeft: theme.spacing(2), }, }));
M app/src/locales/fr.jsonapp/src/locales/fr.json

@@ -57,7 +57,8 @@ "show_details": "Détails de l'événement",

"hide_details": "Cacher les détails", "find_car": "Trouver une voiture", "copied": "Le lien a été copié dans votre presse-papier", - "add_to_my_events": "Ajouter à mes évènements" + "add_to_my_events": "Ajouter à mes évènements", + "see_on_gmap": "Voir sur une carte" }, "errors": { "cant_create": "Impossible de créer l'événement",