Skip to content

Commit 0a35b4a

Browse files
committed
simpler domain check for env
1 parent 0f966ed commit 0a35b4a

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

client/src/config.ts

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
export const ENV =
2-
window.location.hostname === 'todo: change to prod domain'
1+
export const ENV = window.location.hostname.includes('stage.')
2+
? 'stage'
3+
: window.location.hostname === 'todo: change to prod domain'
34
? 'prod'
4-
: window.location.hostname.includes('todo: change to non prod matcher')
5-
? 'stage'
6-
: window.location.port === '4173'
7-
? 'test'
8-
: 'dev';
5+
: window.location.port === '4173'
6+
? 'test'
7+
: 'dev';
98

109
export const getServerUrl = () => {
1110
switch (ENV) {

0 commit comments

Comments
 (0)