fix:핀하우스 home / 글로벌 검색 결과 / 카테고리별 데이터 조회 버그#427
Merged
kyungchan3007 merged 1 commit intodevelopfrom Feb 24, 2026
Merged
Conversation
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.
#️⃣ Issue Number
#426
📝 요약(Summary) (선택)
• 원인: getNextPageParam에서 응답 pages 필드 의존 시 undefined + 1로 NaN 발생 가능.
• 조치: allPages.length + 2 기반으로 다음 페이지 계산하도록 변경.
• 결과: 첫 요청 page=2 이후 3,4... 순차 증가, payload.page=NaN 재발 방지.
• 원인: 초기 nextPage 값과 확장 후 hasNextPage 값이 혼용되어 버튼 상태가 불안정.
• 조치: canLoadMore = isExpanded ? hasNextPage : nextPage 파생값 도입, 버튼 disabled 조건 정리.
• 결과: 초기/확장 이후 모두 일관된 “더보기 가능 여부” 동작.
• 원인: 확장 후 serverItems만 보여서 초기 items가 사라짐.
• 조치: visibleItems를 isExpanded ? [...items, ...serverItems] : items로 변경.
• 결과: 최초 목록 유지 + 추가 조회 목록 누적 표시.
• 원인: 합쳐진 리스트에서 동일 id가 중복되어 key 충돌.
• 조치: 렌더 key를 item.id + index로 변경.
• 결과: Encountered two children with the same key 경고 해소.