Skip to content

Commit

Permalink
remove async/await where wasn't neccesary
Browse files Browse the repository at this point in the history
  • Loading branch information
Matushl committed Nov 11, 2023
1 parent 90ad1c3 commit aa57008
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/components/PageLayout/LoginForm/LoginForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ export const LoginForm: FC<ILoginForm> = ({closeOverlay}) => {
const {login} = AuthContainer.useContainer()
const {handleSubmit, control} = useForm<LoginFormValues>({defaultValues})

const onSubmit: SubmitHandler<LoginFormValues> = async (data) => {
await login({data, onSuccess: closeOverlay})
const onSubmit: SubmitHandler<LoginFormValues> = (data) => {
login({data, onSuccess: closeOverlay})
}

const requiredRule = {required: '* Toto pole nemôže byť prázdne.'}
Expand Down
2 changes: 1 addition & 1 deletion src/components/Profile/ProfileForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export const ProfileForm: FC = () => {
onSuccess: () => router.push(`/${seminar}/profil`),
})

const onSubmit: SubmitHandler<ProfileFormValues> = async (data) => {
const onSubmit: SubmitHandler<ProfileFormValues> = (data) => {
submitFormData(data)
}

Expand Down
2 changes: 1 addition & 1 deletion src/components/RegisterForm/RegisterForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export const RegisterForm: FC = () => {
onSuccess: () => router.push(`${router.asPath}/../verifikacia`),
})

const onSubmit: SubmitHandler<RegisterFormValues> = async (data) => {
const onSubmit: SubmitHandler<RegisterFormValues> = (data) => {
submitFormData(data)
}

Expand Down

0 comments on commit aa57008

Please sign in to comment.