login page refactor

This commit is contained in:
Alex Holliday committed 2026-02-06 21:11:46 +00:00
1 parent ea68e660fc
commit 514570da78
3 files changed
+35 -18

No files matched your search

+3 -1
View File
@@ -42,7 +42,9 @@ export const initApiClient = (store: StoreType): void => {
const onSuccess = (response: AxiosResponse) => response;
const onError = (error: AxiosError) => {
if (error.response?.status === 401) {
window.location.href = "/login";
if (window.location.pathname !== "/login") {
window.location.href = "/login";
}
}
return Promise.reject(error);
};