about summary refs log tree commit diff
path: root/src/env.native.ts
blob: a2ec3a4dce02240a321ba6710b20ba1000a5e583 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
// @ts-ignore types not available -prf
import {REACT_APP_BUILD} from '@env'

if (typeof REACT_APP_BUILD !== 'string') {
  throw new Error('ENV: No env provided')
}
if (!['dev', 'staging', 'prod'].includes(REACT_APP_BUILD)) {
  throw new Error(
    `ENV: Env must be "dev", "staging", or "prod," got "${REACT_APP_BUILD}"`,
  )
}

export const BUILD = REACT_APP_BUILD