change api file and design poster

This commit is contained in:
ehsan
2025-10-04 20:36:50 +03:30
parent 83e482507b
commit 0b90e1abc4
6 changed files with 24 additions and 14 deletions
+4 -5
View File
@@ -1,4 +1,3 @@
import { removeToken } from "@/utils";
import axios from "axios";
import Cookies from "js-cookie";
import "react-toastify/dist/ReactToastify.css";
@@ -21,10 +20,10 @@ api.interceptors.response.use(
return response.data;
},
(error) => {
if (error.status === 401) {
removeToken();
window.location.pathname = "login";
}
// if (error.status === 401) {
// removeToken();
// window.location.pathname = "login";
// }
return Promise.reject(error);
}
);