import { useState } from "react" import { fetchAPI } from "utils/api" import * as yup from "yup" import { Formik, Form, Field } from "formik" import Button from "../elements/button" const LeadForm = ({ data }) => { const [loading, setLoading] = useState(false) const LeadSchema = yup.object().shape({ email: yup.string().email().required(), }) return (
{(errors.email && touched.email && errors.email) || errors.api}