import React from "react"; import { useForm } from "./hooks/useForm"; import Input from "./input"; import Button from "./button"; import { logInForm } from "../utils/formFields"; export const SignInForm = ({ error, submitHandler }) => { const [form, { onChangeHandler, returnAllValues, focusEvent, blurEvent }] = useForm(logInForm); const submit = e => { e.preventDefault(); const values = returnAllValues(); submitHandler(values); }; return (
{Object.keys(form.form).map(input_name => { return ( ); })} {error &&

{error}

}
); };