[fix] import 중복 제거 및 클럽 정보 수정 후 캐시 무효화 개선#1066
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (1)
Warning
|
| 집단 / 파일(s) | 변경 요약 |
|---|---|
Google Drive URL 변환 함수 수정 frontend/src/hooks/Queries/useClub.ts |
convertToDriveUrl에서 convertGoogleDriveUrl로 import 변경, 로고 변환 함수 호출 업데이트 |
클럽 정보 수정 페이로드 업데이트 frontend/src/pages/AdminPage/tabs/ClubInfoEditTab/ClubInfoEditTab.tsx |
클럽 정보 업데이트 시 updatedData 페이로드에 clubDetail.id 필드 추가 |
Estimated code review effort
🎯 2 (Simple) | ⏱️ ~8 minutes
Possibly related PRs
- [feature] 관리자페이지 수정하기 api 연동 #195: ClubInfoEditTab의 업데이트 페이로드에 clubDetail.id를 추가하는 변경과 직접 관련
- [feature] 상세페이지 활동사진 추가 #238: convertGoogleDriveUrl 유틸리티 함수를 import하고 사용하는 변경과 직접 관련
- [refactor] useGetCardList 파라미터를 객체로 변경 #823: 클럽 로고 URL 변환 관련 Google Drive 변환 함수 수정과 관련
Suggested labels
🔨 Refactor
Suggested reviewers
- oesnuj
- lepitaaar
- suhyun113
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
| Check name | Status | Explanation |
|---|---|---|
| Description Check | ✅ Passed | Check skipped - CodeRabbit’s high-level summary is enabled. |
| Title check | ✅ Passed | PR 제목은 변경 사항의 주요 내용을 잘 반영하고 있습니다. 중복 import 제거와 캐시 무효화 개선이라는 두 가지 핵심 변경 사항을 명확하게 요약하고 있습니다. |
| Docstring Coverage | ✅ Passed | No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. |
✏️ Tip: You can configure your own custom pre-merge checks in the settings.
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 @coderabbitai help to get the list of available commands and usage tips.
There was a problem hiding this comment.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
frontend/src/pages/AdminPage/tabs/ClubInfoEditTab/ClubInfoEditTab.tsx (1)
135-145: 로컬 캐시 무효화 제거 - 훅에서 이미 처리됨
useUpdateClubDetail훅의onSuccess콜백에서 이미queryKeys.club.detail(variables.id)로 캐시를 무효화하고 있습니다. 여기서 같은 쿼리 키['clubDetail', clubDetail.id]로 다시 무효화를 시도하는 것은 불필요한 중복입니다.♻️ 제안하는 수정 - 중복 무효화 제거
updateClub(updatedData, { onSuccess: () => { alert('동아리 정보가 성공적으로 수정되었습니다.'); - queryClient.invalidateQueries({ - queryKey: ['clubDetail', clubDetail.id], - }); }, onError: (error) => { alert(`동아리 정보 수정에 실패했습니다: ${error.message}`); }, });
🧹 Nitpick comments (1)
frontend/src/hooks/Queries/useClub.ts (1)
57-64:club.logo에 대한 null 체크 누락 가능성Line 33에서는
data.logo ? convertGoogleDriveUrl(data.logo) : undefined로 null 체크를 하고 있지만, line 61에서는club.logo에 대한 null 체크 없이 바로convertGoogleDriveUrl을 호출하고 있습니다.
club.logo가 null 또는 undefined일 수 있다면 동일한 패턴을 적용하는 것이 안전합니다.♻️ 제안하는 수정
select: (data) => ({ totalCount: data.totalCount, clubs: data.clubs.map((club) => ({ ...club, - logo: convertGoogleDriveUrl(club.logo), + logo: club.logo ? convertGoogleDriveUrl(club.logo) : undefined, })), }),
suhyun113
left a comment
There was a problem hiding this comment.
import 중복 제거하고 함수명 정리한거 좋아요~
수고하셨습니당
#️⃣연관된 이슈
📝작업 내용
1. 중복 import 제거
convertGoogleDriveUrl 함수가 두 가지 이름으로 중복 import됨
convertToDriveUrl (잘못된 이름)
convertGoogleDriveUrl (올바른 이름)
=> convertGoogleDriveUrl로 통일
2. 클럽 정보 수정 시 id 누락 문제 해결
중점적으로 리뷰받고 싶은 부분(선택)
논의하고 싶은 부분(선택)
🫡 참고사항
Summary by CodeRabbit
릴리즈 노트
✏️ Tip: You can customize this high-level summary in your review settings.