Skip to content

Commit

Permalink
refactor: useDeletePostDetailAPId 의 onSettled to onSuccess
Browse files Browse the repository at this point in the history
  • Loading branch information
ienrum committed Jul 16, 2024
1 parent dd1f6fe commit 90a7373
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/apis/postDetail.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export const useDeletePostDetailAPI = (postId: string) => {
onMutate: async () => {
router.push('/');
},
onSettled: () => {
onSuccess: () => {
queryClient.invalidateQueries({ queryKey: ['postList'] });
queryClient.invalidateQueries({ queryKey: ['posts', postId] });
},
Expand Down

0 comments on commit 90a7373

Please sign in to comment.