Feat/feed detail - #21
Merged
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.
📋 개요
피드 상세 페이지에 실제 API를 연결하고, Mock 데이터를 제거했습니다. React Query를 활용해 댓글 무한 스크롤, 좋아요, 댓글 등록 등의 기능을 구현했습니다.
🔄 주요 변경사항
1. FeedDetailPage.tsx - 완전 리팩토링
contentId받기 (useParams추가)useGetContent()- 피드 상세 정보 조회useGetComments()- 댓글 목록 (정렬: 최신순/인기순)usePostLike()- 좋아요 토글usePostComment()- 댓글 등록formatRelativeTime())2. API 엔드포인트 수정
src/api/contents/mutations.tscomment→commentssrc/api/contents/queries.tscomment→comments3. 아이콘 추가
4. 설정 값 조정
src/api/feeds/queries.ts,src/api/match/queries.ts,src/api/stats/queries.tsretry: false,refetchOnWindowFocus: false제거 (기본값 사용으로 복원)5. 타입 정의 복원
src/api/stats/types.tsBatterStatsMetrics→PlayerStatsMetrics(되돌림)PitcherStatsMetrics제거player_type: "BATTER" | "PITCHER"→player_type: string(되돌림)6. instance.ts 간소화
getFreshAccessToken()함수 제거