add users and fix modal
This commit is contained in:
@@ -8,29 +8,16 @@ import FormModal from "@/components/Forms/Modal";
|
||||
|
||||
export type FormRowProps = {
|
||||
form: Form;
|
||||
isEdit: boolean;
|
||||
closeModal: () => void;
|
||||
handleSubmit: (form: FormInputs, id?: number) => void;
|
||||
}
|
||||
|
||||
export default function FormRow({
|
||||
form,
|
||||
isEdit,
|
||||
closeModal,
|
||||
handleSubmit
|
||||
}: FormRowProps) {
|
||||
const deleteMutation = deleteForm();
|
||||
const navigate = useNavigate();
|
||||
const {data: currentForm, isPending} = getForm(form.id);
|
||||
|
||||
|
||||
return (
|
||||
<Table.Tr key={form.id}>
|
||||
<FormModal
|
||||
opened={isEdit}
|
||||
onClose={closeModal}
|
||||
currentForm={currentForm}
|
||||
handleSubmit={handleSubmit}
|
||||
/>
|
||||
<Table.Td>{form.name}</Table.Td>
|
||||
<Table.Td>{form.season}</Table.Td>
|
||||
<Table.Td>{form.start}</Table.Td>
|
||||
|
||||
Reference in New Issue
Block a user