Conversation
- 동아리 소개, 모집 정보 무효화 쿼리키 구체화 - 동아리 소개 공용 api 함수 의존성 제거
요청 시 토큰 제거
✅ Deploy Preview for hanjari ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
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.
| const { data } = useClubIntroQuery(clubId); | ||
| const { mutate: update } = useUpdateClubIntroMutation(clubId); | ||
|
|
There was a problem hiding this comment.
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.
| queryClient.invalidateQueries({ | ||
| queryKey: ['clubs'], | ||
| queryKey: ['clubs', 'recruitment', clubId], | ||
| }); |
There was a problem hiding this comment.
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.
| }); | |
| }); | |
| queryClient.invalidateQueries({ | |
| queryKey: ['clubs', 'profile', clubId], | |
| }); |
#️⃣ 연관된 이슈
📝 작업 내용
💬 리뷰 요구사항(선택)