File tree 2 files changed +4
-4
lines changed
help-center/src/components
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -30,8 +30,8 @@ const initSmooch = ( {
30
30
jwt : string ;
31
31
externalId : string | undefined ;
32
32
} ) => {
33
- const currentEnvironment = config ( 'env_id' ) ;
34
- const isTestMode = currentEnvironment !== 'production' ;
33
+ const currentEnvironment = config ( 'env_id' ) as string ;
34
+ const isTestMode = ! [ 'production' , 'desktop' ] . includes ( currentEnvironment ) ;
35
35
36
36
return Smooch . init ( {
37
37
integrationId : isTestMode ? SMOOCH_INTEGRATION_ID_STAGING : SMOOCH_INTEGRATION_ID ,
Original file line number Diff line number Diff line change @@ -22,8 +22,8 @@ export const useAttachFileToConversation = () => {
22
22
conversationId : string ;
23
23
file : File ;
24
24
} ) => {
25
- const currentEnvironment = config ( 'env_id' ) ;
26
- const isTestMode = currentEnvironment !== 'production' ;
25
+ const currentEnvironment = config ( 'env_id' ) as string ;
26
+ const isTestMode = ! [ 'production' , 'desktop' ] . includes ( currentEnvironment ) ;
27
27
28
28
const integrationId = isTestMode ? SMOOCH_INTEGRATION_ID_STAGING : SMOOCH_INTEGRATION_ID ;
29
29
const url = isTestMode ? WIDGET_URL_STAGING : WIDGET_URL ;
You can’t perform that action at this time.
0 commit comments