From 7e12a1eb0a0ccde81448a4c18b8b268bf885f505 Mon Sep 17 00:00:00 2001 From: hamid zarghami Date: Sat, 31 May 2025 17:20:51 +0330 Subject: [PATCH] fix bug login --- src/config/axios.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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({