From 13ddce1afc72615c71beb1957ff73e98fa11e0d8 Mon Sep 17 00:00:00 2001 From: Kien Ngo Date: Fri, 14 Jun 2024 21:31:41 -0400 Subject: [PATCH] Update --- src/components/help/contact-support-modal.tsx | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/components/help/contact-support-modal.tsx b/src/components/help/contact-support-modal.tsx index 71acb07a92..b6f3652296 100644 --- a/src/components/help/contact-support-modal.tsx +++ b/src/components/help/contact-support-modal.tsx @@ -12,7 +12,6 @@ import { } from "@chakra-ui/react"; import { FormProvider, useForm } from "react-hook-form"; import { Button, Heading } from "tw-components"; -import { useTxNotifications } from "hooks/useTxNotifications"; import { CreateTicketInput, useCreateTicket, @@ -73,10 +72,6 @@ export const ContactSupportModal = () => { const { isOpen, onOpen, onClose } = useDisclosure(); const form = useForm(); const productLabel = form.watch("product"); - const { onSuccess, onError } = useTxNotifications( - "Successfully sent support ticket. Our team will be in touch using your account email shortly.", - "Failed to send ticket. Please try again.", - ); const { isLoggedIn } = useLoggedInUser(); const { mutate: createTicket, @@ -146,13 +141,7 @@ export const ContactSupportModal = () => { { - try { - createTicket(data); - } catch (err) { - onError(err); - } - })} + onSubmit={form.handleSubmit((data) => createTicket(data))} > {error ? (