diff --git a/src/config/axios.ts b/src/config/axios.ts index dda79ce..91a0612 100644 --- a/src/config/axios.ts +++ b/src/config/axios.ts @@ -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({