Skip to content

Commit c603d82

Browse files
committed
fix env ts
1 parent 1e50175 commit c603d82

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

apps/sim/lib/environment.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,29 @@
11
/**
22
* Environment utility functions for consistent environment detection across the application
33
*/
4-
import { env, isTruthy } from './env'
4+
import { env, getEnv, isTruthy } from './env'
55

66
/**
77
* Is the application running in production mode
88
*/
9-
export const isProd = true
9+
export const isProd = env.NODE_ENV === 'production'
1010

1111
/**
1212
* Is the application running in development mode
1313
*/
14-
export const isDev = false
14+
export const isDev = env.NODE_ENV === 'development'
1515

1616
/**
1717
* Is the application running in test mode
1818
*/
19-
export const isTest = false
19+
export const isTest = env.NODE_ENV === 'test'
2020

2121
/**
2222
* Is this the hosted version of the application
2323
*/
24-
export const isHosted = true
24+
export const isHosted =
25+
getEnv('NEXT_PUBLIC_APP_URL') === 'https://www.sim.ai' ||
26+
getEnv('NEXT_PUBLIC_APP_URL') === 'https://www.staging.sim.ai'
2527

2628
/**
2729
* Is billing enforcement enabled

0 commit comments

Comments
 (0)