import { useState } from "react"; import { HelpScout, useChat } from "react-live-chat-loader"; import { classNames } from "@calcom/lib"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { trpc } from "@calcom/trpc/react"; import { Icon } from "@calcom/ui"; import { Button } from "@calcom/ui/v2"; import Meta from "@calcom/ui/v2/core/Meta"; import { getLayout } from "@calcom/ui/v2/core/layouts/SettingsLayout"; interface CtaRowProps { title: string; description: string; children: React.ReactNode; className?: string; } const CtaRow = ({ title, description, className, children }: CtaRowProps) => { return ( <>

{title}

{description}

{children}

); }; const BillingView = () => { const { t } = useLocale(); const { data: user } = trpc.useQuery(["viewer.me"]); const isPro = user?.plan === "PRO"; const [, loadChat] = useChat(); const [showChat, setShowChat] = useState(false); const onContactSupportClick = () => { setShowChat(true); loadChat({ open: true }); }; return ( <>
{!isPro && (
)} {showChat && }
); }; BillingView.getLayout = getLayout; export default BillingView;