import clsx from "clsx"; import { useTranslation } from "react-i18next"; import { useState } from "react"; import { MessageCircleIcon } from "~/components/ui/icons/vendor"; export default function ChatSupportButton() { const [isOpen, setIsOpen] = useState(false); const { t } = useTranslation(); function onClick() { try { if (!isOpen) { // @ts-ignore $crisp?.push(["do", "chat:open"]); // @ts-ignore $crisp?.push(["do", "chat:show"]); setIsOpen(true); } else { // @ts-ignore $crisp?.push(["do", "chat:hide"]); setIsOpen(false); } } catch (e) { // ignore } } return (
); }