1- // eslint-disable-next-line no-restricted-imports
1+
22import { noop } from "lodash" ;
33import { useEffect } from "react" ;
44import type { IntercomBootProps , IntercomProps } from "react-use-intercom" ;
@@ -13,7 +13,7 @@ import useMediaQuery from "@calcom/lib/hooks/useMediaQuery";
1313import { localStorage } from "@calcom/lib/webstorage" ;
1414import { trpc } from "@calcom/trpc/react" ;
1515
16- // eslint-disable-next-line turbo/no-undeclared-env-vars
16+
1717export const isInterComEnabled = z . string ( ) . min ( 1 ) . safeParse ( process . env . NEXT_PUBLIC_INTERCOM_APP_ID ) . success ;
1818
1919const useIntercomHook = isInterComEnabled
@@ -57,6 +57,7 @@ export const useIntercom = () => {
5757 ...( data && data ?. email && { email : data . email } ) ,
5858 ...( data && data ?. id && { userId : data . id } ) ,
5959 createdAt : String ( dayjs ( data ?. createdDate ) . unix ( ) ) ,
60+ zIndex : 10 ,
6061 ...( userHash && { userHash } ) ,
6162 hideDefaultLauncher : isMobile ,
6263 customAttributes : {
@@ -104,6 +105,7 @@ export const useIntercom = () => {
104105 createdAt : String ( dayjs ( data ?. createdDate ) . unix ( ) ) ,
105106 ...( userHash && { userHash } ) ,
106107 hideDefaultLauncher : isMobile ,
108+ zIndex : 10 ,
107109 customAttributes : {
108110 //keys should be snake cased
109111 user_name : data ?. username ,
@@ -183,7 +185,6 @@ export const useBootIntercom = () => {
183185 } ;
184186 window . dispatchEvent ( new Event ( "support:ready" ) ) ;
185187 }
186- // eslint-disable-next-line react-hooks/exhaustive-deps
187188 } , [ user , statsData , hasPaidPlan , isTieredSupportEnabled ] ) ;
188189} ;
189190
0 commit comments