Skip to content

Commit

Permalink
Merge pull request #164 from Board-Buddy/Feat/#160
Browse files Browse the repository at this point in the history
Fix: 내 활동 조회 기능 query 옵션 수정
  • Loading branch information
ChaeYubin authored Aug 7, 2024
2 parents aa45b2d + 201287b commit 5214bd7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/hooks/useParticipation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ export const useCancelParticipation = (articleId: string) => {
queryClient.invalidateQueries({
queryKey: ['article', { articleId }],
});
// TODO 쿼리 무효화 되는지 확인
queryClient.invalidateQueries({
queryKey: ['myJoinedArticles'],
});
},
});
};
Expand Down
4 changes: 4 additions & 0 deletions src/hooks/useProfile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,16 @@ export const useGetMyArticles = () => {
return useQuery({
queryKey: ['myArticles'],
queryFn: () => getMyArticles(),
staleTime: 0,
gcTime: 0,
});
};

export const useGetJoinedArticles = () => {
return useQuery({
queryKey: ['myJoinedArticles'],
queryFn: () => getJoinedArticles(),
staleTime: 0,
gcTime: 0,
});
};

0 comments on commit 5214bd7

Please sign in to comment.