Skip to content

Conversation

@numi8462
Copy link
Collaborator

요구사항

기본

  • 유효한 정보를 입력하고 스웨거 명세된 “/auth/signUp”으로 POST 요청해서 
성공 응답을 받으면 회원가입이 완료됩니다.
  • 회원가입이 완료되면 “/login”로 이동합니다.
  • 회원가입을 성공한 정보를 입력하고 스웨거 명세된 “/auth/signIn”으로 POST 요청을 하면 로그인이 완료됩니다.
  • 로그인이 완료되면 로컬 스토리지에 accessToken을 저장하고 “/items” 로 이동합니다.
  • 로그인/회원가입 페이지에 접근시 로컬 스토리지에 accessToken이 있는 경우 ‘/’ 페이지로 이동합니다
  • 로컬 스토리지에 accessToken이 있는 경우 상단바 ‘로그인’ 버튼이 판다 이미지로 바뀝니다.

심화

  • 로그인, 회원가입 기능에 react-hook-form을 활용해봅니다.

주요 변경사항

  • 로그인/회원가입 기능 추가
  • 로그인 시 localstorage에 토큰 및 유저 정보 저장
  • 로그인 시 헤더 변경
  • react-hook-form 및 zod를 사용한 로그인/회원가입으로 변경

스크린샷

멘토에게

  • 셀프 코드 리뷰를 통해 질문 이어가겠습니다.

Copy link
Collaborator

@dongqui dongqui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

연호님! 이번 미션도 굉장히 잘 마무리 해주셨습니다 👍

짧은 시간에 react-hook-form, zod 적용도 너무 잘 해주셨네요! 타입 활용도 훨씬 좋아지셨습니다 :)
마지막 미션, 프로젝트도 화이팅입니다!

const [passwordError, setPasswordError] = useState<string | null>();
const [isButtonEnabled, setIsButtonEnabled] = useState<boolean>(false);
const navigate = useNavigate();
const [isSubmitting, setIsSubmitting] = useState(false);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

react hook form 에서도 제공하는 상태 값입니다 :)

formState: { errors, isValid, isSubmitting }

@dongqui dongqui merged commit 8203805 into codeit-bootcamp-frontend:React-김영호 May 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants