Skip to content

Commit dbd927c

Browse files
authored
fix: intercom zindex (calcom#24096)
1 parent e6b2116 commit dbd927c

5 files changed

Lines changed: 23 additions & 21 deletions

File tree

apps/ui-playground/app/global.css

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -636,10 +636,6 @@ select:focus {
636636
@apply !border-r-default left-0.5 !border-y-0 !border-l-0;
637637
}
638638

639-
.intercom-lightweight-app {
640-
@apply z-40 !important;
641-
}
642-
643639
@import "../../web/styles/tokens.css";
644640

645641
@layer base {
@@ -1027,10 +1023,6 @@ select:focus {
10271023
@apply !border-r-default left-0.5 !border-y-0 !border-l-0;
10281024
}
10291025

1030-
.intercom-lightweight-app {
1031-
@apply z-40 !important;
1032-
}
1033-
10341026
.prose :where(a:not([data-card])):not(:where([class~="not-prose"] *)) {
10351027
text-decoration: none;
10361028
}

apps/web/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@
138138
"react-select": "^5.7.0",
139139
"react-timezone-select": "^1.4.0",
140140
"react-turnstile": "^1.1.3",
141-
"react-use-intercom": "1.5.1",
141+
"react-use-intercom": "^5.5.0",
142142
"recoil": "^0.7.7",
143143
"remove-markdown": "^0.5.0",
144144
"retell-client-js-sdk": "^2.0.0",

apps/web/styles/globals.css

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -640,10 +640,6 @@ select:focus {
640640
@apply !border-r-default left-0.5 !border-y-0 !border-l-0;
641641
}
642642

643-
.intercom-lightweight-app {
644-
@apply z-40 !important;
645-
}
646-
647643
[data-radix-popper-content-wrapper] {
648644
border: none;
649645
}

packages/features/ee/support/lib/intercom/useIntercom.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// eslint-disable-next-line no-restricted-imports
1+
22
import { noop } from "lodash";
33
import { useEffect } from "react";
44
import type { IntercomBootProps, IntercomProps } from "react-use-intercom";
@@ -13,7 +13,7 @@ import useMediaQuery from "@calcom/lib/hooks/useMediaQuery";
1313
import { localStorage } from "@calcom/lib/webstorage";
1414
import { trpc } from "@calcom/trpc/react";
1515

16-
// eslint-disable-next-line turbo/no-undeclared-env-vars
16+
1717
export const isInterComEnabled = z.string().min(1).safeParse(process.env.NEXT_PUBLIC_INTERCOM_APP_ID).success;
1818

1919
const 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

yarn.lock

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4363,7 +4363,7 @@ __metadata:
43634363
react-select: ^5.7.0
43644364
react-timezone-select: ^1.4.0
43654365
react-turnstile: ^1.1.3
4366-
react-use-intercom: 1.5.1
4366+
react-use-intercom: ^5.5.0
43674367
recoil: ^0.7.7
43684368
remove-markdown: ^0.5.0
43694369
retell-client-js-sdk: ^2.0.0
@@ -41237,13 +41237,26 @@ __metadata:
4123741237
languageName: node
4123841238
linkType: hard
4123941239

41240-
"react-use-intercom@npm:1.5.1":
41241-
version: 1.5.1
41242-
resolution: "react-use-intercom@npm:1.5.1"
41240+
"react-use-intercom@npm:^5.5.0":
41241+
version: 5.5.0
41242+
resolution: "react-use-intercom@npm:5.5.0"
4124341243
peerDependencies:
4124441244
react: ">=16.8.0"
4124541245
react-dom: ">=16.8.0"
41246-
checksum: 34f502f037bf93a3b1a9ead9d4380e7bfebd36d85e79ee2f92f14bdcea0b6d709f74e1344ef39d50016ec29c9414075fdb93efb1ad736ede91fa435f83aa3156
41246+
checksum: 2f81068f6ff414aca7afc83d03a4b99bebcb446b970a558d4fad174420371aad2cdb801e246896f37156a6266c6a34c01dde83a3ae80c761aa1f46eaedf763af
41247+
languageName: node
41248+
linkType: hard
41249+
41250+
"react-use-measure@npm:^2.1.1":
41251+
version: 2.1.7
41252+
resolution: "react-use-measure@npm:2.1.7"
41253+
peerDependencies:
41254+
react: ">=16.13"
41255+
react-dom: ">=16.13"
41256+
peerDependenciesMeta:
41257+
react-dom:
41258+
optional: true
41259+
checksum: 5f00c14cf50b0710cdbd27b63a005be20283099d2fa2723a97f3a1cf0b2daedddd67249520c21e49e95348f56428689f3229c343dcb9ed37da58f9c227d29bee
4124741260
languageName: node
4124841261
linkType: hard
4124941262

0 commit comments

Comments
 (0)