refactor(frontend): optimize useDialogs logic

This commit is contained in:
yassinedorbozgithub
2025-02-09 01:45:35 +01:00
parent 90a7c55646
commit f4a438b9dd
19 changed files with 19 additions and 83 deletions

View File

@@ -74,11 +74,7 @@ export const EditUserForm: FC<ComponentFormProps<EditUserFormData>> = ({
}, [reset, data?.user]);
return (
<Wrapper
open={!!WrapperProps?.open}
onSubmit={handleSubmit(onSubmitForm)}
{...WrapperProps}
>
<Wrapper onSubmit={handleSubmit(onSubmitForm)} {...WrapperProps}>
<form onSubmit={handleSubmit(onSubmitForm)}>
<ContentContainer>
<ContentItem>

View File

@@ -62,11 +62,7 @@ export const InviteUserForm: FC<ComponentFormProps<undefined>> = ({
sendInvitation(params);
return (
<Wrapper
open={!!WrapperProps?.open}
onSubmit={handleSubmit(onSubmitForm)}
{...WrapperProps}
>
<Wrapper onSubmit={handleSubmit(onSubmitForm)} {...WrapperProps}>
<form onSubmit={handleSubmit(onSubmitForm)}>
<ContentContainer>
<ContentItem>