forked from bai/curriculum-project-hub
fix(admin-web): break /admin/login returnTo redirect loop in dev
vite dev only proxied /api and /auth, so /admin/login hit the SPA root layout, re-ran loadSession, got 401, and redirected back to /admin/login with an ever-nesting returnTo. Proxy /admin/login to the backend (which owns it before the SPA fallback) and guard redirectToLogin against re-entering /admin/login. Replace the only emoji-as-icon (the back-arrow on project detail) with the Icon component (new arrow-left glyph). Add scripts/dev-bootstrap.ts for seeding a local Silo (stub probes) so npm run dev can start on a fresh dev DB.
This commit is contained in:
@@ -52,6 +52,7 @@ export function resolveLoginOrgSlug(): string | null {
|
||||
}
|
||||
|
||||
export function redirectToLogin(): void {
|
||||
if (window.location.pathname === '/admin/login') return;
|
||||
const ret = encodeURIComponent(
|
||||
window.location.pathname + window.location.search + window.location.hash,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user