Skip to content

fix: [TA-240] MoreInfo onClickHandler에서 setUserInfo 후 즉시 onClickFunc 호출 — 최신 상태 미반영#99

Merged
seorinn merged 2 commits into
developfrom
TA-240-fix-moreinfo-stale-userinfo
May 13, 2026
Merged

fix: [TA-240] MoreInfo onClickHandler에서 setUserInfo 후 즉시 onClickFunc 호출 — 최신 상태 미반영#99
seorinn merged 2 commits into
developfrom
TA-240-fix-moreinfo-stale-userinfo

Conversation

@seorinn

@seorinn seorinn commented May 13, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • MoreInfo/index.tsxhandleNext에서 setUserInfo 후 즉시 onNext() 호출 시 React 비동기 setState로 인해 mainPhotographyTypes, activeRegions가 부모의 userInfo에 반영되기 전에 다음 단계가 실행될 수 있는 버그 수정
  • 기존: setUserInfo({...userInfo, mainPhotographyTypes, activeRegions})onNext() 순서로 호출
  • 변경: onNext({mainPhotographyTypes, activeRegions})로 값을 직접 전달하고, 부모의 goToNextStep에서 setUserInfo(prev => ({...prev, ...updates})) + setStep(prev => prev + 1)을 함께 처리
  • functional updater 패턴으로 step도 stale closure 문제 방지

Test plan

  • PHOTOGRAPHER 회원가입 시 MoreInfo 단계에서 촬영 유형/지역 선택 후 다음 → 최종 API 요청에 mainPhotographyTypes, activeRegions 정상 포함 확인
  • TypeScript 빌드 에러 없음 확인
  • USER 회원가입 흐름 정상 동작 확인 (MoreInfo 단계 없음)

@vercel

vercel Bot commented May 13, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
damaba Ready Ready Preview, Comment May 13, 2026 7:00am

@seorinn seorinn marked this pull request as ready for review May 13, 2026 07:01
@seorinn seorinn merged commit 65ef7b0 into develop May 13, 2026
3 checks passed
@seorinn seorinn deleted the TA-240-fix-moreinfo-stale-userinfo branch May 13, 2026 07:01
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.

1 participant