about summary refs log tree commit diff
path: root/src/state/index.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/state/index.ts
parent38ed9a794353ae89c5c311dcecab00f0313ec675 (diff)
downloadvoidsky-210082be93cd369b868e748c7e89e95fc3ce6bbe.tar.zst
Add staging env
Diffstat (limited to 'src/state/index.ts')
-rw-r--r--src/state/index.ts10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/state/index.ts b/src/state/index.ts
index 2c3df7d07..a886e7611 100644
--- a/src/state/index.ts
+++ b/src/state/index.ts
@@ -3,8 +3,14 @@ import {sessionClient as AtpApi} from '../third-party/api'
 import {RootStoreModel} from './models/root-store'
 import * as libapi from './lib/api'
 import * as storage from './lib/storage'
-
-export const DEFAULT_SERVICE = 'http://localhost:2583'
+import {BUILD} from '../env'
+
+export const DEFAULT_SERVICE =
+  BUILD === 'prod'
+    ? 'http://localhost:2583' // TODO
+    : BUILD === 'staging'
+    ? 'https://pds.staging.bsky.dev' // TODO
+    : 'http://localhost:2583'
 const ROOT_STATE_STORAGE_KEY = 'root'
 const STATE_FETCH_INTERVAL = 15e3