diff --git a/src/components/PageLayout/LoginForm/LoginForm.tsx b/src/components/PageLayout/LoginForm/LoginForm.tsx index 2bed7b6c..12e67c3e 100644 --- a/src/components/PageLayout/LoginForm/LoginForm.tsx +++ b/src/components/PageLayout/LoginForm/LoginForm.tsx @@ -24,8 +24,8 @@ export const LoginForm: FC = ({closeOverlay}) => { const {login} = AuthContainer.useContainer() const {handleSubmit, control} = useForm({defaultValues}) - const onSubmit: SubmitHandler = async (data) => { - await login({data, onSuccess: closeOverlay}) + const onSubmit: SubmitHandler = (data) => { + login({data, onSuccess: closeOverlay}) } const requiredRule = {required: '* Toto pole nemôže byť prázdne.'} diff --git a/src/components/Profile/ProfileForm.tsx b/src/components/Profile/ProfileForm.tsx index 5ac8557c..73e78afb 100644 --- a/src/components/Profile/ProfileForm.tsx +++ b/src/components/Profile/ProfileForm.tsx @@ -92,7 +92,7 @@ export const ProfileForm: FC = () => { onSuccess: () => router.push(`/${seminar}/profil`), }) - const onSubmit: SubmitHandler = async (data) => { + const onSubmit: SubmitHandler = (data) => { submitFormData(data) } diff --git a/src/components/RegisterForm/RegisterForm.tsx b/src/components/RegisterForm/RegisterForm.tsx index 44abb859..90bdc2fc 100644 --- a/src/components/RegisterForm/RegisterForm.tsx +++ b/src/components/RegisterForm/RegisterForm.tsx @@ -80,7 +80,7 @@ export const RegisterForm: FC = () => { onSuccess: () => router.push(`${router.asPath}/../verifikacia`), }) - const onSubmit: SubmitHandler = async (data) => { + const onSubmit: SubmitHandler = (data) => { submitFormData(data) }