From eee3104c1816ed5091567950615166cfca10f464 Mon Sep 17 00:00:00 2001 From: binh-dam-ibigroup <56846598+binh-dam-ibigroup@users.noreply.github.com> Date: Wed, 30 Sep 2020 09:28:34 -0400 Subject: [PATCH] refactor(ApiUserForm): Use Formik.Field to wire inputs automatically. --- components/ApiUserForm.js | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/components/ApiUserForm.js b/components/ApiUserForm.js index 9ff1b8b..07f30a0 100644 --- a/components/ApiUserForm.js +++ b/components/ApiUserForm.js @@ -1,5 +1,5 @@ import clone from 'clone' -import { Formik } from 'formik' +import { Field, Formik } from 'formik' import { Component } from 'react' import { Button, Card, Col, Container, Form, Row } from 'react-bootstrap' import { withAuth } from 'use-auth0-hooks' @@ -108,10 +108,7 @@ class ApiUserForm extends Component { initialValues={apiUser} > {({ - handleBlur, handleSubmit, - handleChange, - values, touched, errors }) => ( @@ -131,14 +128,12 @@ class ApiUserForm extends Component { return (