From b7351e532fc58bc6660b672092fd7e87f98913bb Mon Sep 17 00:00:00 2001 From: yassinedorbozgithub Date: Tue, 4 Feb 2025 11:40:44 +0100 Subject: [PATCH] fix(frontend): remove submitAsync function --- frontend/src/components/categories/CategoryForm.tsx | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/frontend/src/components/categories/CategoryForm.tsx b/frontend/src/components/categories/CategoryForm.tsx index 77d1d52a..c83b6034 100644 --- a/frontend/src/components/categories/CategoryForm.tsx +++ b/frontend/src/components/categories/CategoryForm.tsx @@ -6,7 +6,7 @@ * 2. All derivative works must include clear attribution to the original creator and software, Hexastack and Hexabot, in a prominent location (e.g., in the software's "About" section, documentation, and README file). */ -import React, { BaseSyntheticEvent, FC, useEffect } from "react"; +import React, { FC, useEffect } from "react"; import { useForm } from "react-hook-form"; import { ContentContainer, ContentItem } from "@/app-components/dialogs/"; @@ -59,13 +59,6 @@ export const CategoryForm: FC> = ({ createCategory(params); } }; - const submitAsync = async (e: BaseSyntheticEvent) => { - return await new Promise((resolve) => { - handleSubmit((params) => { - resolve(onSubmitForm(params)); - })(e); - }); - }; useEffect(() => { if (data) { @@ -80,10 +73,10 @@ export const CategoryForm: FC> = ({ return ( -
+