Skip to content

Commit

Permalink
fix: Typing issue on onSubmit function
Browse files Browse the repository at this point in the history
  • Loading branch information
dogukanoksuz committed Apr 26, 2024
1 parent 2a15220 commit 967ce95
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/components/ui/user-auth-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,7 @@ export function UserAuthForm({ className, ...props }: UserAuthFormProps) {
return redirectUri
}

const onLogin = async (
data: z.infer<typeof formSchema> & z.infer<typeof otpSchema>
) => {
const onLogin = async (data: z.infer<typeof otpSchema>) => {
setIsLoading(true)

try {
Expand Down Expand Up @@ -259,7 +257,7 @@ export function UserAuthForm({ className, ...props }: UserAuthFormProps) {
{!otpSetup && !enableOtp && !forceChange && (
<Form {...loginForm}>
<form
onSubmit={loginForm.handleSubmit(onLogin)}
onSubmit={loginForm.handleSubmit(onLogin as any)}
className="grid gap-4"
>
<FormField
Expand Down

0 comments on commit 967ce95

Please sign in to comment.