Skip to content

Commit

Permalink
refactor:불필요한 코드 제거
Browse files Browse the repository at this point in the history
  • Loading branch information
Dahyeeee committed Oct 6, 2023
1 parent 12ca54a commit 79a2dd7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion frontend/src/hooks/api/queryClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ export const queryClient = new QueryClient({
retry: NETWORK.RETRY_COUNT,
suspense: true,
useErrorBoundary: true,
cacheTime: 0,
},
},
});
3 changes: 2 additions & 1 deletion frontend/src/hooks/api/useLikeMutation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const useLikeMutation = () => {
const likeMutation = useMutation({
mutationFn: postLike,
onSuccess: () => {
queryClient.invalidateQueries({ queryKey: ['communityTrips', 1] });
queryClient.invalidateQueries({ queryKey: ['communityTrips'] });
queryClient.invalidateQueries({ queryKey: ['recommendedTrips'] });
},
onError: (error: ErrorResponseData) => {
Expand All @@ -28,6 +28,7 @@ export const useLikeMutation = () => {
if (error.code && error.code > ERROR_CODE.TOKEN_ERROR_RANGE) {
handleTokenError();
}

createToast('오류가 발생했습니다. 다시 시도해 주세요.');
},
});
Expand Down

0 comments on commit 79a2dd7

Please sign in to comment.