From f9d05f7a0e3d7f63ea499521d39bec44701761cf Mon Sep 17 00:00:00 2001 From: Joe Au-Yeung <65426560+joeauyeung@users.noreply.github.com> Date: Mon, 13 Jun 2022 15:05:05 -0400 Subject: [PATCH] Add helpscout to billing page (#3054) * Add helpscout to billing page * Upgrades CI node to 16 Co-authored-by: zomars --- apps/web/pages/settings/billing.tsx | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/apps/web/pages/settings/billing.tsx b/apps/web/pages/settings/billing.tsx index 96acb03822..98895ad305 100644 --- a/apps/web/pages/settings/billing.tsx +++ b/apps/web/pages/settings/billing.tsx @@ -1,9 +1,10 @@ import { ExternalLinkIcon } from "@heroicons/react/solid"; +import { useState } from "react"; import { ReactNode } from "react"; +import { HelpScout, useChat } from "react-live-chat-loader"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import Button from "@calcom/ui/Button"; -import { useIntercom } from "@ee/lib/intercom/useIntercom"; import useMeQuery from "@lib/hooks/useMeQuery"; @@ -26,7 +27,13 @@ export default function Billing() { const { t } = useLocale(); const query = useMeQuery(); const { data } = query; - const { boot, show } = useIntercom(); + const [active, setActive] = useState(false); + const [, loadChat] = useChat(); + + const handleClick = () => { + setActive(true); + loadChat({ open: true }); + }; return ( @@ -59,18 +66,14 @@ export default function Billing() {

{t("further_billing_help")}

-
+ {active && }
);