Skip to content

Commit

Permalink
refactor: useTokenRefresh 훅 내의 불필요한 코드 제거
Browse files Browse the repository at this point in the history
  • Loading branch information
areumH committed Jan 22, 2025
1 parent 45bc1cc commit 79812fc
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/hooks/common/useTokenRefresh.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/* eslint-disable no-console */
import { useQueryClient } from '@tanstack/react-query';
import { getRefreshToken } from '@/api/interceptor';
import { useNewDispatch, useNewSelector } from '@/store';
import { selectAccessToken, tokenActions } from '@/store/auth';
Expand All @@ -9,7 +8,6 @@ import { useNavigate } from 'react-router-dom';
export const useTokenRefresh = () => {
const dispatch = useNewDispatch();
const navigate = useNavigate();
const queryClient = useQueryClient();

const accessToken = useNewSelector(selectAccessToken);

Expand All @@ -32,5 +30,5 @@ export const useTokenRefresh = () => {
tokenRefresh().catch((error) => {
console.error('토큰 에러: ', error);
});
}, [accessToken, dispatch, navigate, queryClient]);
}, [accessToken, dispatch, navigate]);
};

0 comments on commit 79812fc

Please sign in to comment.