[BOM-1074] fix: 비로그인 유저의 불필요한 API 호출 방지#293
Open
JeLee-river wants to merge 1 commit into
Hidden character warning
The head ref may contain hidden characters: "BOM-1074-\ube44\ub85c\uadf8\uc778-\uc720\uc800\uc758-\ubd88\ud544\uc694\ud55c-api-\ud638\ucd9c-\ubc29\uc9c0"
Open
Conversation
jaeyoung-kwon
approved these changes
Jul 14, 2026
jaeyoung-kwon
left a comment
Contributor
There was a problem hiding this comment.
🤖 PR Review
✅ 확실하게 수정이 필요한 항목을 찾지 못했습니다.
비로그인 사용자에게 인증이 필요한 내 순위 조회(myMonthlyReadingRank, myStreakReadingRank) 쿼리를
enabled: isLoggedIn으로 가드하는 최소 범위 수정입니다. 전체 랭킹(useSuspenseQuery)은 그대로 유지되고, 렌더링부에서도userRank &&로 undefined를 이미 가드하고 있어 타입/런타임 문제가 없습니다. 로그아웃 시window.location.reload()로 전체 리로드가 일어나 react-query 캐시가 초기화되므로 로그아웃 후 이전 사용자의 순위 데이터가 잔존해 노출될 위험도 없습니다. isLoggedIn이 false→true로 바뀌면 react-query가 자동으로 refetch하므로 로그인 직후 내 순위도 정상 노출됩니다.
🚨 0 Critical ·
📋 검증 과정
- Claude structured review 결과 중 확신도가 있는 항목만 정리했습니다.
- Critical/Major는 inline comment로 게시하고, Minor는 참고 항목으로 summary에 포함합니다.
- 자동 생성된 OpenAPI 타입 선언 파일과 lock 파일은 리뷰 대상에서 제외합니다.
🤖 Claude PR Review
Generated by Claude Code
sanghee01
approved these changes
Jul 14, 2026
sanghee01
left a comment
Contributor
There was a problem hiding this comment.
좋은데요? 이제 Sentry 로그인 알림의 악몽 끝나는건가요!!
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.
📌 What
/페이지 진입 시 인증이 필요한 API를 불필요하게 호출하던 문제 수정❓ Why
MonthlyRankingContent,StreakRankingContent)는 비로그인 유저도 볼 수 있는 공개 콘텐츠지만, 내 순위 조회(myMonthlyReadingRank,myStreakReadingRank)는 인증 필요🔧 How
useAuth()의isLoggedIn을 조건으로enabled옵션 추가useSuspenseQuery(전체 랭킹)는 그대로 유지 — 비로그인 유저도 랭킹 목록은 정상 조회 가능useQuery(내 순위)만enabled: isLoggedIn으로 가드👀 Review Point
/페이지 진입 시myMonthlyReadingRank,myStreakReadingRank요청이 발생하지 않는지 확인isLoggedIn변경에 따라 쿼리가 재실행되는지 확인