When I run the build command I am getting the type error . Following is the error
Type error: Type ‘(event: React.FormEvent) => void’ is not assignable to type ‘FormSubmitHandler’.
Types of parameters ‘event’ and ‘payload’ are incompatible.
Type ‘{ data: FieldValues; event?: BaseSyntheticEvent<object, any, any> | undefined; formData: FormData; formDataJson: string; method?: “delete” | “post” | “put” | undefined; }’ is missing the following properties from type ‘FormEvent’: nativeEvent, currentTarget, target, bubbles, and 11 more.
80 | };
81 | return (
> 82 | <Form onSubmit={handleOnSubmit} className='contact-form'>
| ^
83 | {errorMsg && <p className='errorMsg'>{errorMsg}</p>}
84 | <InputLabel htmlFor="email">Email</InputLabel>