diff --git a/sample.env b/sample.env index 39b7f545..cdc3427d 100644 --- a/sample.env +++ b/sample.env @@ -8,3 +8,11 @@ REACT_APP_SENTRY_ENVIRONMENT='your_sentry_env_name' # Airtable API REACT_APP_AIRTABLE_API_KEY='your_airtable_api_key' + +# Optional Airtable base overrides. If unset, the ELA production base IDs +# hardcoded in src/components/config/api.ts are used. Contributors who do +# not have access to the official ELA bases can duplicate the schema into +# their own workspace and set the corresponding env var here to point the +# local dev build at it. +REACT_APP_AIRTABLE_BASE='' +REACT_APP_AIRTABLE_CENSUS_BASE='' diff --git a/src/components/config/api.ts b/src/components/config/api.ts index 7ae08fad..58f8bdb9 100644 --- a/src/components/config/api.ts +++ b/src/components/config/api.ts @@ -1,8 +1,10 @@ import { RouteLocation } from './types' export const AIRTABLE_API_KEY = process.env.REACT_APP_AIRTABLE_API_KEY as string -export const AIRTABLE_BASE = 'applPEl3BsnpuszQu' -export const AIRTABLE_CENSUS_BASE = 'appjb6Qnp4lTNz7Gn' +export const AIRTABLE_BASE = + process.env.REACT_APP_AIRTABLE_BASE || 'applPEl3BsnpuszQu' +export const AIRTABLE_CENSUS_BASE = + process.env.REACT_APP_AIRTABLE_CENSUS_BASE || 'appjb6Qnp4lTNz7Gn' // TODO: get this into provider/global so it doesn't need adding every time export const reactQueryDefaults = {