fix bug login
This commit is contained in:
+3
-1
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user