Skip to content

Commit

Permalink
Update GoogleMap.js
Browse files Browse the repository at this point in the history
Prefix env variables with `GATSBY_` if you want them by accessable in js after the build
  • Loading branch information
FDiskas committed Feb 21, 2021
1 parent e85b0e7 commit 86d336e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/GoogleMap.js
Expand Up @@ -3,8 +3,8 @@ import GoogleMapReact from 'google-map-react'
import { MapPin } from 'react-feather'

let mapkey = ''
if (process.env.NETLIFY_MAP_KEY) {
mapkey = process.env.NETLIFY_MAP_KEY
if (process.env.GATSBY_NETLIFY_MAP_KEY) {
mapkey = process.env.GATSBY_NETLIFY_MAP_KEY
}

class GoogleMap extends Component {
Expand Down

0 comments on commit 86d336e

Please sign in to comment.