Init mapbox with the access token in env

This commit is contained in:
Kimmo Puputti 2018-08-08 14:12:51 +03:00 committed by Vesa Luusua
parent 3d8965a1d5
commit cd2b89906b
2 changed files with 7 additions and 0 deletions

View file

@ -3,6 +3,7 @@
#
REACT_APP_SHARETRIBE_SDK_CLIENT_ID=
REACT_APP_GOOGLE_MAPS_API_KEY=
REACT_APP_MAPBOX_ACCESS_TOKEN=
REACT_APP_STRIPE_PUBLISHABLE_KEY=
# Defaults

View file

@ -144,6 +144,12 @@
</script>
<script src="https://maps.googleapis.com/maps/api/js?key=%REACT_APP_GOOGLE_MAPS_API_KEY%&libraries=places"></script>
<link href="https://api.mapbox.com/mapbox-gl-js/v0.47.0/mapbox-gl.css" rel="stylesheet" />
<script src="https://api.mapbox.com/mapbox-gl-js/v0.47.0/mapbox-gl.js"></script>
<script>
window.mapboxgl.accessToken = '%REACT_APP_MAPBOX_ACCESS_TOKEN%';
</script>
<!--
Stripe script should be on every page, not just the pages that
use the API: