import React, { useState } from 'react'; import { Formik } from 'formik'; import * as Yup from 'yup'; import authApi from '../../apis/auth.api'; const SignupForm = () => { const [success, setSuccess] = useState(false); return ( <>

회원가입

{ try { const result = await authApi.signup(values) // console.log('회원가입 요청 후 result 확인', result, '|', result.status) } catch (error) { console.log(error) } setTimeout(() => { setSubmitting(false); }, 400); }} > {formik => (
{formik.touched.userId && formik.errors.userId ? (
{formik.errors.userId}
) : null}
{formik.touched.password && formik.errors.password ? (
{formik.errors.password}
) : null}
{formik.touched.repassword && formik.errors.repassword ? (
{formik.errors.repassword}
) : null}
{formik.touched.userName && formik.errors.userName ? (
{formik.errors.userName}
) : null}
{formik.touched.userStudNum && formik.errors.userStudNum ? (
{formik.errors.userStudNum}
) : null}
)}
); } export default SignupForm;