diff --git a/apps/frontend/app/providers/ApiProvider.tsx b/apps/frontend/app/providers/ApiProvider.tsx index cf2838a..542e8f8 100644 --- a/apps/frontend/app/providers/ApiProvider.tsx +++ b/apps/frontend/app/providers/ApiProvider.tsx @@ -32,7 +32,6 @@ const queryClient = new QueryClient(); */ export const ApiProvider: React.FC = ({ children }) => { - const navigate = useNavigate(); const axiosInstance = axios.create({ withCredentials: true, }); @@ -41,21 +40,6 @@ export const ApiProvider: React.FC = ({ children }) => { withCredentials: true, }); - internalAxiosInstance.interceptors.response.use( - (response) => response, - (error) => { - // only handle 403 errors - if (!error.response) return Promise.reject(error); - - if (error.response.status === 401) { - // redirect to login page - return navigate('/login', {}); - } - - return Promise.reject(error); - } - ); - const apiClient = createApi(axiosInstance); const tanstackApiClient = createTanstackApi(internalAxiosInstance);