Skip to content

[fix] import 중복 제거 및 클럽 정보 수정 후 캐시 무효화 개선#1066

Merged
seongwon030 merged 3 commits intodevelop-fefrom
fix/import-and-invalidate-id
Jan 18, 2026
Merged

[fix] import 중복 제거 및 클럽 정보 수정 후 캐시 무효화 개선#1066
seongwon030 merged 3 commits intodevelop-fefrom
fix/import-and-invalidate-id

Conversation

@seongwon030
Copy link
Member

@seongwon030 seongwon030 commented Jan 18, 2026

#️⃣연관된 이슈

ex) #이슈번호, #이슈번호

📝작업 내용

1. 중복 import 제거

convertGoogleDriveUrl 함수가 두 가지 이름으로 중복 import됨
convertToDriveUrl (잘못된 이름)
convertGoogleDriveUrl (올바른 이름)

=> convertGoogleDriveUrl로 통일

2. 클럽 정보 수정 시 id 누락 문제 해결

  • useUpdateClubDetail훅의 onSuccess에서 수정된 클럽의 상세 정보 캐시를 무효화하기 위해 clubId가 필요

중점적으로 리뷰받고 싶은 부분(선택)

리뷰어가 특별히 봐주었으면 하는 부분이 있다면 작성해주세요

ex) 메서드 XXX의 이름을 더 잘 짓고 싶은데 혹시 좋은 명칭이 있을까요?

논의하고 싶은 부분(선택)

논의하고 싶은 부분이 있다면 작성해주세요.

🫡 참고사항

Summary by CodeRabbit

릴리즈 노트

  • 버그 수정
    • 클럽 로고 처리 시 정확한 Google Drive URL 변환 함수를 사용하도록 수정했습니다.
    • 클럽 정보 업데이트 요청에 클럽 ID 필드를 포함하도록 개선했습니다.

✏️ Tip: You can customize this high-level summary in your review settings.

@seongwon030 seongwon030 self-assigned this Jan 18, 2026
@seongwon030 seongwon030 added 💻 FE Frontend 🛠Fix 기능이 의도한 대로 동작하지 않는 버그를 수정 labels Jan 18, 2026
@vercel
Copy link

vercel bot commented Jan 18, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
moadong Ready Ready Preview, Comment Jan 18, 2026 0:51am

@seongwon030 seongwon030 requested a review from suhyun113 January 18, 2026 12:37
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 18, 2026

Warning

Rate limit exceeded

@seongwon030 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 15 minutes and 52 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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.

📥 Commits

Reviewing files that changed from the base of the PR and between ac0aeff and 26cada4.

📒 Files selected for processing (1)
  • frontend/src/pages/AdminPage/tabs/ClubInfoEditTab/ClubInfoEditTab.tsx

Warning

.coderabbit.yaml has a parsing error

The CodeRabbit configuration file in this repository has a parsing error and default settings were used instead. Please fix the error(s) in the configuration file. You can initialize chat with CodeRabbit to get help with the configuration file.

💥 Parsing errors (1)
Validation error: Invalid regex pattern for base branch. Received: "**" at "reviews.auto_review.base_branches[0]"
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Walkthrough

Google Drive URL 변환 함수의 잘못된 import를 수정하고 클럽 로고 매핑에 올바른 함수를 적용했습니다. 또한 클럽 정보 수정 시 업데이트 요청 페이로드에 clubDetail.id 필드를 추가했습니다.

Changes

집단 / 파일(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

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

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,
       })),
     }),

Copy link
Collaborator

@suhyun113 suhyun113 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

import 중복 제거하고 함수명 정리한거 좋아요~
수고하셨습니당

@seongwon030 seongwon030 merged commit 1e2050a into develop-fe Jan 18, 2026
1 check passed
@seongwon030 seongwon030 deleted the fix/import-and-invalidate-id branch January 18, 2026 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

💻 FE Frontend 🛠Fix 기능이 의도한 대로 동작하지 않는 버그를 수정

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments