Skip to content

Commit

Permalink
🧹 불필요한 코드 제거
Browse files Browse the repository at this point in the history
  • Loading branch information
jhsung23 committed Mar 10, 2024
1 parent 7ca5725 commit fbfed49
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/hooks/auth/useGetUser.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { useQuery } from '@tanstack/react-query';
import { isAxiosError } from 'axios';
import { hasCookie } from 'cookies-next';

import { IS_LOGIN } from '@/constants/auth';
Expand All @@ -17,7 +16,7 @@ const useGetUser = () => {
queryKey: ['user'],
queryFn: getUser,
enabled: hasCookie(IS_LOGIN),
throwOnError: (error) => isAxiosError(error),
throwOnError: true,
staleTime: Infinity,
gcTime: Infinity,
});
Expand Down

0 comments on commit fbfed49

Please sign in to comment.