Allow REACT_APP_SITE_URL env variable

This commit is contained in:
Eric Jinks 2018-01-30 11:48:08 +10:00
parent 41e2bce291
commit a1e336f474
2 changed files with 5 additions and 1 deletions

2
.gitignore vendored
View file

@ -11,7 +11,7 @@ build
# misc
.DS_Store
.env
npm-debug.log
.env*.local
src/data.json

View file

@ -18,3 +18,7 @@ if (module.hot) {
}
registerServiceWorker()
if (process.env.REACT_APP_SITE_URL && 'localStorage' in window) {
window.localStorage.setItem('netlifySiteURL', process.env.REACT_APP_SITE_URL)
}