Skip to content

Commit

Permalink
♻️ Refactor: isError에 따른 성공 및 실패 메시지 조건부 적용
Browse files Browse the repository at this point in the history
  • Loading branch information
sy-paik committed Nov 10, 2023
1 parent 0f76034 commit 608472f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/Signup/SignupForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const SignupForm = ({ onSuccess, mutate, isError, message }) => {
id='email'
type='email'
placeHolder='이메일 주소를 입력해주세요'
isError={isError}
isError={errors.email?.message || isError}
errorMsg={errors.email?.message || isError && message}
successMsg={!isError && message}
{...emailController.field}
Expand All @@ -64,6 +64,7 @@ const SignupForm = ({ onSuccess, mutate, isError, message }) => {
id='password'
type='password'
placeHolder='비밀번호를 입력해주세요'
isError={errors.password?.message}
errorMsg={errors.password?.message}
{...passwordController.field}
/>
Expand Down

0 comments on commit 608472f

Please sign in to comment.