Repository navigation
fix: queryString 전 케이스 보호 — view/sort/dir 언어전환·URL로드 시 유지 - #34
Merged
Merged
Conversation
- RosterList: skipHydration으로 인한 초기 characters=[] 상태에서 cleanup effect가 view/sort/dir를 제거하는 버그 수정 (isInitialMount ref) - RosterInitializer: ?r= 제거 시 view/sort/dir 등 다른 파라미터 유지 - RosterUrlLoader: ?r= 제거 시 view/sort/dir 등 다른 파라미터 유지
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
근본 원인
skipHydration: true설정으로 Zustand 스토어가characters: []로 시작. 페이지 리로드(언어 전환 포함) 시 하이드레이션 전에RosterList의 cleanupuseEffect가 실행돼view/sort/dir파라미터를 제거하는 것이 핵심 버그였음.또한
RosterInitializer와RosterUrlLoader가?r=제거 시router.replace("/")호출로 모든 파라미터를 함께 날리고 있었음.수정 내용
RosterList
isInitialMountref 추가 — 초기 마운트 시 cleanup effect를 건너뜀characters=[]상태에서 URL params 제거 방지RosterInitializer
router.replace("/")→r파라미터만 제거,view/sort/dir유지RosterUrlLoader
r파라미터만 제거, 나머지 파라미터 보존검증된 케이스
/?view=party&sort=score→/en?view=party&sort=score✓/en?view=party→/?view=party✓?r=xxx&view=party→ 로드 완료 후/?view=party✓