about summary refs log tree commit diff
path: root/src/env.native.ts
diff options
context:
space:
mode:
authorPaul Frazee <pfrazee@gmail.com>2022-11-11 15:02:19 -0600
committerPaul Frazee <pfrazee@gmail.com>2022-11-11 15:02:19 -0600
commit210082be93cd369b868e748c7e89e95fc3ce6bbe (patch)
treea6371c2f006a0fa19068fe283da3ed3d3df57fb0 /src/env.native.ts
parent38ed9a794353ae89c5c311dcecab00f0313ec675 (diff)
downloadvoidsky-210082be93cd369b868e748c7e89e95fc3ce6bbe.tar.zst
Add staging env
Diffstat (limited to 'src/env.native.ts')
-rw-r--r--src/env.native.ts13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/env.native.ts b/src/env.native.ts
index 581b211ca..a2ec3a4dc 100644
--- a/src/env.native.ts
+++ b/src/env.native.ts
@@ -1,8 +1,13 @@
 // @ts-ignore types not available -prf
-import {REACT_APP_AUTH_LOBBY} from '@env'
+import {REACT_APP_BUILD} from '@env'
 
-if (typeof REACT_APP_AUTH_LOBBY !== 'string') {
-  throw new Error('ENV: No auth lobby provided')
+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 AUTH_LOBBY = REACT_APP_AUTH_LOBBY
+export const BUILD = REACT_APP_BUILD