Commit 5f9f71fb authored by Choi Ga Young's avatar Choi Ga Young
Browse files

세부사항 수정

parent dbc0e71e
......@@ -25,7 +25,7 @@ const LoginForm = () => {
password: Yup.string()
.required('비밀번호를 입력해주세요.'),
})}
onSubmit={async (values, { setSubmitting }) => {
onSubmit={async (values, { setSubmitting, resetForm }) => {
try {
setError("")
const result = await authApi.login(values)
......@@ -34,6 +34,7 @@ const LoginForm = () => {
}
} catch (error) {
catchErrors(error, setError)
resetForm();
}
setTimeout(() => {
setSubmitting(false);
......
......@@ -44,7 +44,7 @@ const SignupForm = () => {
.required('학번을 입력해주세요.')
.min(7, '학번을 정확히 입력해주세요.'),
})}
onSubmit={async (values, { setSubmitting }) => {
onSubmit={async (values, { setSubmitting, resetForm }) => {
try {
setError("")
const result = await authApi.signup(values)
......@@ -55,6 +55,7 @@ const SignupForm = () => {
}
} catch (error) {
catchErrors(error, setError)
resetForm();
}
setTimeout(() => {
setSubmitting(false);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment