From 5ef53439824f42b5df8bdd9d6746f619bec54282 Mon Sep 17 00:00:00 2001 From: Bhanu Prakash Sai Potteri Date: Mon, 25 May 2026 10:36:40 +0530 Subject: [PATCH] fix: 401 redirect respects Vite base path (/tech_mahindra/login) --- src/api/viewService.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/viewService.ts b/src/api/viewService.ts index cf863b6..4ad1a99 100644 --- a/src/api/viewService.ts +++ b/src/api/viewService.ts @@ -22,7 +22,7 @@ async function request(method: string, path: string, body?: unknown): Promise if (res.status === 401) { localStorage.removeItem(TOKEN_KEY); localStorage.removeItem("zino_user"); - window.location.href = "/login"; + window.location.href = `${import.meta.env.BASE_URL}login`; throw new Error("Unauthorized"); } if (!res.ok) {