fix: remove dead /server/ fallback redirect
When no org is resolved, redirect to /tenant instead of the non-existent /server/ path. Fixes login redirect loop. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -41,7 +41,7 @@ export function Layout() {
|
|||||||
|
|
||||||
// Determine current org slug for server dashboard link
|
// Determine current org slug for server dashboard link
|
||||||
const currentOrg = organizations.find((o) => o.id === currentOrgId);
|
const currentOrg = organizations.find((o) => o.id === currentOrgId);
|
||||||
const serverDashboardHref = currentOrg?.slug ? `/t/${currentOrg.slug}/` : '/server/';
|
const serverDashboardHref = currentOrg?.slug ? `/t/${currentOrg.slug}/` : '#';
|
||||||
|
|
||||||
// Build breadcrumbs from path
|
// Build breadcrumbs from path
|
||||||
const segments = location.pathname.replace(/^\//, '').split('/').filter(Boolean);
|
const segments = location.pathname.replace(/^\//, '').split('/').filter(Boolean);
|
||||||
|
|||||||
@@ -39,9 +39,12 @@ function LandingRedirect() {
|
|||||||
return <Navigate to="/tenant" replace />;
|
return <Navigate to="/tenant" replace />;
|
||||||
}
|
}
|
||||||
// Regular user (operator/viewer) → server dashboard directly
|
// Regular user (operator/viewer) → server dashboard directly
|
||||||
const serverUrl = currentOrg?.slug ? `/t/${currentOrg.slug}/` : '/server/';
|
if (currentOrg?.slug) {
|
||||||
window.location.href = serverUrl;
|
window.location.href = `/t/${currentOrg.slug}/`;
|
||||||
return null;
|
return null;
|
||||||
|
}
|
||||||
|
// No org resolved yet — stay on tenant portal
|
||||||
|
return <Navigate to="/tenant" replace />;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function AppRouter() {
|
export function AppRouter() {
|
||||||
|
|||||||
Reference in New Issue
Block a user