feat: auth pages layout (#2042)

* auth pages layout
* exclude home route from redirect
* fix margin
This commit is contained in:
Philip Okugbe
2026-03-22 16:40:50 +00:00
committed by GitHub
parent 6683c515cf
commit 975b4dcaab
12 changed files with 124 additions and 61 deletions
+6 -2
View File
@@ -74,8 +74,12 @@ function redirectToLogin() {
];
if (!exemptPaths.some((path) => window.location.pathname.startsWith(path))) {
const redirectTo = window.location.pathname;
const params = new URLSearchParams({ redirect: redirectTo });
window.location.href = `${APP_ROUTE.AUTH.LOGIN}?${params.toString()}`;
if (redirectTo === APP_ROUTE.HOME) {
window.location.href = APP_ROUTE.AUTH.LOGIN;
} else {
const params = new URLSearchParams({ redirect: redirectTo });
window.location.href = `${APP_ROUTE.AUTH.LOGIN}?${params.toString()}`;
}
}
}