Require an env var to show default searches

This commit is contained in:
Kimmo Puputti 2018-08-16 16:58:25 +03:00 committed by Hannu Lyytikainen
parent 669e1a7edb
commit 46a8e2bbfc
2 changed files with 3 additions and 1 deletions

View file

@ -35,3 +35,4 @@ REACT_APP_ENV=production
#
REACT_APP_AVAILABILITY_ENABLED=true
REACT_APP_DEFAULT_SEARCHES_ENABLED=true

View file

@ -283,7 +283,8 @@ const maps = {
// Example location can be edited in the
// `default-location-searches.js` file.
defaults: defaultLocationSearches,
defaults:
process.env.REACT_APP_DEFAULT_SEARCHES_ENABLED === 'true' ? defaultLocationSearches : [],
},
// When fuzzy locations are enabled, coordinates on maps are