fix api /me

This commit is contained in:
Mikola
2023-12-25 20:58:18 +03:00
parent 5e7c9dec79
commit 80ebf85347
3 changed files with 29 additions and 27 deletions

View File

@ -1,6 +1,8 @@
import axios from "axios";
import { getToken, urlHasParams } from "@utils/helper";
import { store } from "@store/store";
import { setProfileInfo } from "@redux/outstaffingSlice";
const instance = axios.create({
baseURL: process.env.REACT_APP_API_URL,
@ -39,6 +41,7 @@ export const apiRequest = (
window.location.replace("/auth");
localStorage.clear();
// dispatch(auth(false));
store.dispatch(setProfileInfo({}))
}
return resolve(response);
})