[Refactor/#268] 워크스페이스·캠페인 그룹 useCoreQuery/useCoreMutation 패턴 통일 - #275
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthrough
ChangesuseCoreQuery/useCoreMutation 마이그레이션
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
📚 Storybook 배포 완료
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/components/sidebar/WorkspaceSwitcher.tsx`:
- Around line 58-66: Prevent duplicate workspace switch requests while a save is
in flight in WorkspaceSwitcher by disabling or ignoring additional clicks until
saveSelectedWorkspace finishes. Update the useCoreMutation flow around
saveWorkspace so userOnSuccess/onError only apply the latest requested orgId,
and ensure the dropdown is closed or interactions are blocked before any
invalidateKeys-driven delay can allow another selection.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 610510e0-a196-472f-90e7-bd2eeb6640b4
📒 Files selected for processing (2)
src/components/sidebar/WorkspaceSwitcher.tsxsrc/hooks/ads/useCampaignGroup.ts
🚨 관련 이슈
close #268
✨ 변경사항
✏️ 작업 내용
팀 공통 추상화 훅(
useCoreQuery,useCoreMutation) 도입에 따라 담당 파일의 rawuseQuery/useMutation을 교체했습니다.WorkspaceSwitcher.tsxsaveWorkspacemutation →useCoreMutation(saveSelectedWorkspace, …)적용invalidateQueries수동 호출 →invalidateKeys로 이전userOnSuccess로 이전useQueryClientimport 제거useCampaignGroup.tsuseQuery3개 →useCoreQuery교체createGroupmutation →useCoreMutation<void, void>교체invalidateKeys: [QUERY_KEYS.campaign.list(orgId)]userOnSuccess/userOnError로 이전useQueryClient,IApiErrorResponseimport 제거😅 미완성 작업
N/A
📢 논의 사항 및 참고 사항
N/A
Summary by CodeRabbit