fix ModalRegistration
This commit is contained in:
parent
4b0176079e
commit
0764002a60
@ -129,12 +129,14 @@ export const ModalRegistration = ({ active, setActive }) => {
|
||||
<Loader style={"green"} />
|
||||
) : (
|
||||
<BaseButton
|
||||
onClick={(e) => {
|
||||
onClick={async (e) => {
|
||||
e.preventDefault();
|
||||
setLoader(true);
|
||||
handleSubmit(e);
|
||||
const result = await handleSubmit(e);
|
||||
if (result === true) {
|
||||
closeModal();
|
||||
}
|
||||
setLoader(false);
|
||||
closeModal();
|
||||
}}
|
||||
styles="button-box__submit"
|
||||
>
|
||||
|
@ -102,6 +102,9 @@ export const useFormValidation = (
|
||||
} catch (error) {
|
||||
console.error("Error submitting form:", error);
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user