Skip to content

Conversation

@jjanie00
Copy link
Contributor

@jjanie00 jjanie00 commented May 22, 2025

🔗 이슈 번호

Closes #206


📋 작업 사항

비밀번호 재설정 폼 제출 및 API 호출

  • 비밀번호 재설정 폼 제출 : useSearchParams 로 토큰을 가져와, patchResetPassword( ) 호출
  • 요청 성공 : 성공 토스트 메시지 렌더링 및 /login 페이지로 라우팅 처리
  • 요청 실패 : 실패 토스트 메시지 렌더링 및 에러 로그 출력
    • 비밀번호 재설정 링크카 만료되었습니다. 다시 요청해주세요. 가 출력되도록 함
  • 폼 제출 시점에 formErrors 객체 초기화로 기존의 에러 메시지가 남지 않도록 안전 장치 추가

Suspense 도입으로 CSR bailout 빌드 에러 해결

상위 페이지 컴포넌트에서 props 로 내려주는 방법 사용 시, useSearchParams 를 페이지 컴포넌트에서 사용해야 하기 때문에 클라이언트 컴포넌트로 만들어야 함. 이는 Next.js 의 공식 설계 철학 과 위배되므로 Suspense 를 도입함.

  • Suspense 로 비동기 컴포넌트 (폼) 을 감싸 CSR bailout 빌드 에러 해결
  • fallback 으로 빈 페이지가 렌더링 되지 않도록 조정
  • token 이 null 인 경우에 대해 방어로직 추가 : 유효하지 않은 링크입니다. 다시 시도해주세요. 토스트 메시지

이전 코드 리뷰 반영

  • 코드 리뷰 반영 : 비밀번호 재설정 모달 api 요청 실패 시, /signup 라우팅 삭제
    (가입된 사용자가 오타를 내는 상황 고려)
  • 디버깅용 콘솔 출력 삭제

기타

  • API 함수 주석 개선 : pathResetPassword, patchPassword

📷 스크린샷

2025-05-22.5.50.19.mov

📢 공유 사항


📚 참고 자료

@jjanie00 jjanie00 requested review from MINJI121 and MySoupRice May 22, 2025 08:56
@jjanie00 jjanie00 self-assigned this May 22, 2025
@jjanie00 jjanie00 added the 💫feat 기능 구현 이슈 label May 22, 2025
@jjanie00 jjanie00 linked an issue May 22, 2025 that may be closed by this pull request
2 tasks
@github-actions
Copy link

Preview Deployment
🔗 https://coworkers-jvreo9ibj-hyeonjirohs-projects.vercel.app

Copy link
Contributor

@MINJI121 MINJI121 left a comment

Choose a reason for hiding this comment

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

고생하셨습니다 해명님~!!

Copy link
Contributor

@MySoupRice MySoupRice left a comment

Choose a reason for hiding this comment

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

수고하셨습니다!

@MySoupRice MySoupRice merged commit 69eced2 into dev May 22, 2025
1 check passed
@MySoupRice MySoupRice deleted the feat/#206/reset-passsword-page branch May 22, 2025 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

💫feat 기능 구현 이슈

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[feat] 비밀번호 재설정 페이지

4 participants