Skip to content
This repository has been archived by the owner on Jun 19, 2024. It is now read-only.

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
kien-ngo committed Jun 15, 2024
1 parent dc970fb commit 13ddce1
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions src/components/help/contact-support-modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -73,10 +72,6 @@ export const ContactSupportModal = () => {
const { isOpen, onOpen, onClose } = useDisclosure();
const form = useForm<CreateTicketInput>();
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,
Expand Down Expand Up @@ -146,13 +141,7 @@ export const ContactSupportModal = () => {
<FormProvider {...form}>
<ModalContent
as="form"
onSubmit={form.handleSubmit((data) => {
try {
createTicket(data);
} catch (err) {
onError(err);
}
})}
onSubmit={form.handleSubmit((data) => createTicket(data))}
>
<ModalCloseButton isDisabled={isLoading} />
{error ? (
Expand Down

0 comments on commit 13ddce1

Please sign in to comment.