refactor(Newsletter.tsx): melhorando tipagem

This commit is contained in:
Ana Carolina Duarte Cavalcante 2023-01-13 11:48:33 -03:00
parent 830c22b91a
commit 5f5cc7bf51

View File

@ -11,11 +11,10 @@ const initialValues = {
};
const Newsletter = () => {
function onSubmit(_values: NewsletterArea, { resetForm }:any) {
resetForm({ values: "" });
}
return (
<Formik initialValues={initialValues} onSubmit={onSubmit} validationSchema={schema}>
<Formik initialValues={initialValues} validationSchema={schema} onSubmit={(_values: NewsletterArea, actions) => {
actions.resetForm();
}}>
{({isValid}) => (
<Form className={styles["Newsletter"]}>
<div className={styles["Newsletter__Content"]}>