Scheduling infrastructure for absolutely everyone.
openIntercom="true" open intercom (#15235)
Somay Chauhan3f51ae626cca
diff --git a/apps/web/modules/event-types/views/event-types-listing-view.tsx b/apps/web/modules/event-types/views/event-types-listing-view.tsxindex 901ea2ac4a0..3338f76e477 100644--- a/apps/web/modules/event-types/views/event-types-listing-view.tsx+++ b/apps/web/modules/event-types/views/event-types-listing-view.tsx@@ -9,6 +9,7 @@ import { memo, useEffect, useState } from "react";import { z } from "zod";import { useOrgBranding } from "@calcom/features/ee/organizations/context/provider";+import useIntercom from "@calcom/features/ee/support/lib/intercom/useIntercom";import { EventTypeEmbedButton, EventTypeEmbedDialog } from "@calcom/features/embed/EventTypeEmbed";import { EventTypeDescription } from "@calcom/features/eventtypes/components";import CreateEventTypeDialog from "@calcom/features/eventtypes/components/CreateEventTypeDialog";@@ -946,6 +947,8 @@ const EventTypesPage: React.FC & {getLayout?: AppProps["Component"]["getLayout"];} = () => {const { t } = useLocale();+ const searchParams = useCompatSearchParams();+ const { open } = useIntercom();const { data: user } = useMeQuery();// eslint-disable-next-line @typescript-eslint/no-unused-varsconst [showProfileBanner, setShowProfileBanner] = useState(false);@@ -960,6 +963,13 @@ const EventTypesPage: React.FC & {staleTime: 1 * 60 * 60 * 1000,});+ useEffect(() => {+ if (searchParams?.get("openIntercom") === "true") {+ open();+ }+ // eslint-disable-next-line react-hooks/exhaustive-deps+ }, []);+useEffect(() => {setShowProfileBanner(!!orgBranding && !document.cookie.includes("calcom-profile-banner=1") && !user?.completedOnboarding