fix bug login

This commit is contained in:
hamid zarghami
2025-05-31 17:20:51 +03:30
parent fc6f0d94a2
commit 7e12a1eb0a
+3 -1
View File
@@ -41,7 +41,9 @@ axiosInstance.interceptors.response.use(
if (!refreshTokenValue) {
removeRefreshToken();
removeToken();
window.location.href = "/";
const slug = localStorage.getItem(import.meta.env.VITE_SLUG_ID);
const slug_parse = slug ? JSON.parse(slug) : null;
window.location.href = `/${slug_parse?.slug}`;
return;
}
const { data } = await refreshToken({