chore: Remove all instances of useIntercom (#18500)

This commit is contained in:
Alex van Andel authored and GitHub committed 2025-01-07 07:43:46 -05:00
1 parent 06d8b98b15
commit fd7f6c32ae
5 files changed
+8 -281

No files matched your search

@@ -2,7 +2,6 @@
import { usePathname } from "next/navigation";
import { useIntercom } from "@calcom/features/ee/support/lib/intercom/useIntercom";
import { classNames } from "@calcom/lib";
import { WEBAPP_URL } from "@calcom/lib/constants";
import { useLocale } from "@calcom/lib/hooks/useLocale";
@@ -32,12 +31,13 @@ export const CtaRow = ({ title, description, className, children }: CtaRowProps)
const BillingView = () => {
const pathname = usePathname();
const { t } = useLocale();
const { open } = useIntercom();
const returnTo = pathname;
const billingHref = `/api/integrations/stripepayment/portal?returnTo=${WEBAPP_URL}${returnTo}`;
const onContactSupportClick = async () => {
await open();
if (window.Plain) {
window.Plain.open();
}
};
return (
@@ -2,7 +2,6 @@
import { usePathname } from "next/navigation";
import { useIntercom } from "@calcom/features/ee/support/lib/intercom/useIntercom";
import Shell from "@calcom/features/shell/Shell";
import { WEBAPP_URL } from "@calcom/lib/constants";
import { useLocale } from "@calcom/lib/hooks/useLocale";
@@ -17,12 +16,13 @@ import { CtaRow } from "~/settings/billing/billing-view";
export default function PlatformBillingUpgrade() {
const pathname = usePathname();
const { t } = useLocale();
const { open } = useIntercom();
const returnTo = pathname;
const billingHref = `/api/integrations/stripepayment/portal?returnTo=${WEBAPP_URL}${returnTo}`;
const onContactSupportClick = async () => {
await open();
if (window.Plain) {
window.Plain.open();
}
};
const { isUserLoading, isUserBillingDataLoading, isPlatformUser, userBillingData, isPaidUser, userOrgId } =
useGetUserAttributes();