Skip to content

동아리 어드민 쿼리 개선, 동아리 모집 쿼리 오류 수정#272

Open
vlmbuyd wants to merge 2 commits intodevelopfrom
refactor/query
Open

동아리 어드민 쿼리 개선, 동아리 모집 쿼리 오류 수정#272
vlmbuyd wants to merge 2 commits intodevelopfrom
refactor/query

Conversation

@vlmbuyd
Copy link
Member

@vlmbuyd vlmbuyd commented Feb 16, 2026

#️⃣ 연관된 이슈

관련 이슈번호를 적어주세요 ex) #이슈번호


📝 작업 내용

이번 PR에서 작업한 내용을 간략히 설명해주세요 (이미지 첨부 가능)

  • 커밋 메시지 참고

💬 리뷰 요구사항(선택)

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

- 동아리 소개, 모집 정보 무효화 쿼리키 구체화
- 동아리 소개 공용 api 함수 의존성 제거
@vlmbuyd vlmbuyd requested a review from Copilot February 16, 2026 08:13
@vlmbuyd vlmbuyd self-assigned this Feb 16, 2026
@netlify
Copy link

netlify bot commented Feb 16, 2026

Deploy Preview for hanjari ready!

Name Link
🔨 Latest commit 2cf8e4e
🔍 Latest deploy log https://app.netlify.com/projects/hanjari/deploys/6992d1a0fee90c0008ae0a97
😎 Deploy Preview https://deploy-preview-272--hanjari.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@vlmbuyd vlmbuyd added 🐞 BugFix 오류 및 버그 수정 🔨 Refactor 코드 리팩토링 labels Feb 16, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

동아리 어드민/소개/모집 관련 React Query 훅들의 호출 방식과 캐시 무효화 키를 조정해, 쿼리 동작을 더 구체화하고(특히 clubId 단위) 일부 조회/갱신 흐름을 개선하려는 PR입니다.

Changes:

  • 동아리 모집 안내 조회 쿼리에서 토큰 첨부 옵션을 제거
  • 모집 상태 변경 mutation의 invalidate 키를 clubId 단위로 구체화
  • 동아리 소개(소개글) 조회/수정 훅을 clubId 인자로 받는 형태로 개편하고, 어드민 폼에서 새로운 시그니처로 사용하도록 수정

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/domains/club/recruitment/api/recruitment.queries.ts 모집 안내 조회 요청에서 requireToken 제거
src/domains/club/recruitment/api/recruitment.mutations.ts 모집 상태 변경 후 invalidate queryKey를 recruitment+clubId로 변경
src/domains/club/introduction/ui/admin/ClubIntroductionForm.tsx 소개 조회/수정 훅 호출을 clubId 인자 방식으로 변경
src/domains/club/introduction/api/introduction.queries.ts 소개 조회 훅을 useQuery + apiRequest 기반으로 재작성
src/domains/club/introduction/api/introduction.mutations.ts 소개 수정 mutation을 clubId 캡처 방식으로 변경 + introduction 캐시 무효화 키 구체화

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +34 to 36
const { data } = useClubIntroQuery(clubId);
const { mutate: update } = useUpdateClubIntroMutation(clubId);

Copy link

Copilot AI Feb 16, 2026

Choose a reason for hiding this comment

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

useUpdateClubIntroMutation now captures clubId in the hook signature, so the mutate call should only need the data payload. The current form logic still builds/passes { data, clubId: Number(clubId) }, which is now redundant and can be misleading (the mutationFn ignores clubId). Update the submit payload to match the new mutation input shape.

Copilot uses AI. Check for mistakes.
queryClient.invalidateQueries({
queryKey: ['clubs'],
queryKey: ['clubs', 'recruitment', clubId],
});
Copy link

Copilot AI Feb 16, 2026

Choose a reason for hiding this comment

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

useUpdateRecruitStatusMutation now invalidates only ['clubs','recruitment',clubId], but the UI that triggers this mutation (e.g. the admin dashboard) reads recruitmentStatus from useClubOverviewQuery (queryKey starts with ['clubs','profile',clubId,...]). With the narrower invalidation, the dashboard status can remain stale after an update. Consider also invalidating the relevant overview/profile query key (or using a broader partial key like ['clubs', clubId] / ['clubs']) so recruitmentStatus is refetched.

Suggested change
});
});
queryClient.invalidateQueries({
queryKey: ['clubs', 'profile', clubId],
});

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐞 BugFix 오류 및 버그 수정 🔨 Refactor 코드 리팩토링

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant