-
Notifications
You must be signed in to change notification settings - Fork 1
Fix/77: 쿼리키 추가 #78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix/77: 쿼리키 추가 #78
Conversation
Walkthrough이 변경 사항은 Changes
Assessment against linked issues
Possibly related PRs
Suggested labels
Suggested reviewers
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (2)
src/app/search/[id]/_components/transaction-form/history.tsx (2)
Line range hint
31-39: 성능 최적화를 위한 제안사항이 있습니다.현재 정렬 로직이 프론트엔드에서 처리되고 있습니다. 데이터가 많아질 경우 성능에 영향을 줄 수 있으므로, 백엔드에서 정렬된 데이터를 받아오는 것이 좋습니다.
- [...tradeHistoryData] - .sort((a, b) => b.id - a.id) - .map((history) => ( + tradeHistoryData.map((history) => (
Line range hint
15-24: 에러 처리 로직 추가를 제안드립니다.현재 로딩 상태만 처리되어 있고 에러 상태에 대한 처리가 없습니다. 사용자 경험 향상을 위해 에러 처리를 추가하는 것이 좋습니다.
const { data: tradeHistoryData, isLoading, isPending, + error, } = useQuery({ queryKey: ["tradeHistory", `${stockName}`], queryFn: () => getTradeHistory(token, stockName), enabled: !!isAuthenticated && !!token, }); + if (error) { + return ( + <div className="text-center text-red-500"> + 데이터를 불러오는 중 오류가 발생했습니다. + </div> + ); + }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
src/app/search/[id]/_components/transaction-form/history.tsx(1 hunks)
🔇 Additional comments (1)
src/app/search/[id]/_components/transaction-form/history.tsx (1)
20-20: 쿼리키 수정이 적절하게 구현되었습니다.
stockName을 쿼리키에 추가함으로써 각 종목별로 독립적인 캐싱이 가능해졌습니다. 이는 체결내역 캐싱 문제를 효과적으로 해결할 것으로 보입니다.
#️⃣ 이슈
📝 작업 내용
이번 PR에서 작업한 내용을 간략히 설명해주세요.
📸 스크린샷
✅ 체크 리스트
👩💻 공유 포인트 및 논의 사항
Summary by CodeRabbit