diff --git a/frontend/src/components/labels/LabelFormDialog.tsx b/frontend/src/components/labels/LabelFormDialog.tsx index 16f692b7..8b183e3a 100644 --- a/frontend/src/components/labels/LabelFormDialog.tsx +++ b/frontend/src/components/labels/LabelFormDialog.tsx @@ -6,32 +6,19 @@ * 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 { FC } from "react"; - -import { FormDialog } from "@/app-components/dialogs"; -import { useTranslate } from "@/hooks/useTranslate"; +import { GenericFormDialog } from "@/app-components/dialogs"; import { ComponentFormDialogProps } from "@/types/common/dialogs.types"; import { ILabel } from "@/types/label.types"; import { LabelForm } from "./LabelForm"; -export const LabelFormDialog: FC> = ({ - payload, - ...rest -}) => { - const { t } = useTranslate(); - - return ( - { - rest.onClose(true); - }} - Wrapper={FormDialog} - WrapperProps={{ - title: payload ? t("title.edit_label") : t("title.new_label"), - ...rest, - }} - /> - ); -}; +export const LabelFormDialog = ( + props: ComponentFormDialogProps, +) => ( + + Form={LabelForm} + addText="title.new_label" + editText="title.edit_label" + {...props} + /> +);