Skip to content

perf: [TA-268] SearchPage 탭 전환 시 동일 목록 중복 fetch - #147

Merged
seorinn merged 1 commit into
developfrom
TA-268-searchpage-dedupe
Jun 30, 2026
Merged

seorinn merged 1 commit into
developfrom
TA-268-searchpage-dedupe

Conversation

@seorinn

@seorinn seorinn commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

변경 사항

  • Promotions/Photographers 자식이 첫 렌더에서 부모가 넘긴 data를 신뢰하고 중복 조회를 건너뜀(isFirstRender ref)
  • 이후 필터(searchParams)/키워드가 실제로 바뀔 때만 재조회
  • 방어: searchKeyword가 빈 경우 fetch 스킵
  • useState(data)가 탭 재마운트에 의존함을 주석 명시

배경

부모(SearchPage)가 키워드로 목록을 fetch해 data prop으로 넘기는데, 자식이 마운트 useEffect에서 같은 키워드로 또 조회 → 탭 진입마다 중복 요청.

검증

  • tsc·전체 테스트 통과
  • state가 PROMOTION/PHOTOGRAPHER가 되는 경로는 Overview '더보기'(키워드+결과 있을 때만)뿐 → 빈 키워드 진입 불가 확인
  • 참고: FilterBar 마운트 정규화로 정렬 디폴트가 URL에 반영되며 필터 적용 조회 1건은 정상 동작(중복 아님)

Closes TA-268

@vercel

vercel Bot commented Jun 30, 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 Jun 30, 2026 4:42am

@seorinn
seorinn marked this pull request as ready for review June 30, 2026 04:45
@seorinn
seorinn merged commit d6b3189 into develop Jun 30, 2026
3 checks passed
@seorinn
seorinn deleted the TA-268-searchpage-dedupe branch June 30, 2026 04:45

This branch was successfully deployed

1 active deployment
Preview — 65ad9aed Deployed Jun 30, 2026 by vercel[bot]
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