Skip to content

Commit

Permalink
fix: 지원자 단계 이동시 평가 목록 정보도 초기화되도록 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
seongjinme committed Aug 21, 2024
1 parent 0dcf862 commit 6ed4f57
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion frontend/src/hooks/useApplicant/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ export default function useApplicant({ applicantId }: { applicantId?: number })
return useMutation({
mutationFn: ({ processId, applicants }: { processId: number; applicants: number[] }) =>
applicantApis.move({ processId, applicants }),
onSuccess: () => {
onSuccess: (_, variables) => {
const { processId } = variables;
queryClient.invalidateQueries({ queryKey: [QUERY_KEYS.DASHBOARD, dashboardId, postId] });
queryClient.invalidateQueries({ queryKey: [QUERY_KEYS.EVALUATION, processId, applicantId] });
if (applicantId) {
queryClient.invalidateQueries({ queryKey: [QUERY_KEYS.APPLICANT, applicantId] });
}
Expand Down

0 comments on commit 6ed4f57

Please sign in to comment.