File tree Expand file tree Collapse file tree 1 file changed +7
-17
lines changed
packages/common/src/config Expand file tree Collapse file tree 1 file changed +7
-17
lines changed Original file line number Diff line number Diff line change @@ -8,23 +8,13 @@ const NODE_ENV = JSON.stringify(process.env.NODE_ENV || 'development');
88const LOCAL_SERVER = Boolean ( JSON . stringify ( process . env . LOCAL_SERVER ) ) ;
99const STAGING_API = Boolean ( JSON . stringify ( process . env . STAGING_API ) ) ;
1010
11- const getAbTestingEnv = ( ) => {
12- const host = ( ) => {
13- if ( process . env . NODE_ENV === 'production' ) {
14- const CODESANDBOX_HOST = getHost ( ) ;
15- return CODESANDBOX_HOST . split ( '//' ) [ 1 ] ;
16- }
17-
18- return process . env . DEV_DOMAIN ;
19- } ;
20-
21- return `https://ab-testing.${
22- process . env . NODE_ENV === 'development' || process . env . STAGING
23- ? 'codesandbox.stream'
24- : host ( )
25- } `;
26- } ;
27- export const AB_TESTING_URL = getAbTestingEnv ( ) ;
11+ const AB_TESTING_URL_STAGING = 'https://ab-testing.codesandbox.stream' ;
12+ const AB_TESTING_URL_PRODUCTION = 'https://ab-testing.codesandbox.io' ;
13+ export const AB_TESTING_URL = / c o d e s a n d b o x \. i o / . test (
14+ typeof window !== `undefined` ? window ?. location ?. host : ''
15+ )
16+ ? AB_TESTING_URL_PRODUCTION
17+ : AB_TESTING_URL_STAGING ;
2818
2919export const getExperimentUserId = ( ) => {
3020 const KEY_NAME = 'csb-ab-user-id' ;
You can’t perform that action at this time.
0 commit comments