You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
spa_instat_tv/src/config/env.tsx

17 lines
586 B

import includes from 'lodash/includes'
export type ENVType = NodeJS.ProcessEnv['REACT_APP_ENV']
const apis: Array<ENVType> = ['staging', 'preproduction', 'production']
export const isValidEnv = (value: string): value is ENVType => (
Boolean(value) && includes(apis, value)
)
export const ENV = process.env.REACT_APP_ENV || 'staging'
export const isProduction = ENV === 'production' || ENV === 'preproduction'
export const stageENV = process.env.REACT_APP_STAGE || 'staging'
export const STRIPE_PUBLIC_KEY = process.env.REACT_APP_STRIPE_PK || 'pk_test_fkEjSoWfJXuCwMgwHRpbOGPt'