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
|
||||
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
|
||||
const segments = location.pathname.replace(/^\//, '').split('/').filter(Boolean);
|
||||
|
||||
@@ -39,10 +39,13 @@ function LandingRedirect() {
|
||||
return <Navigate to="/tenant" replace />;
|
||||
}
|
||||
// Regular user (operator/viewer) → server dashboard directly
|
||||
const serverUrl = currentOrg?.slug ? `/t/${currentOrg.slug}/` : '/server/';
|
||||
window.location.href = serverUrl;
|
||||
if (currentOrg?.slug) {
|
||||
window.location.href = `/t/${currentOrg.slug}/`;
|
||||
return null;
|
||||
}
|
||||
// No org resolved yet — stay on tenant portal
|
||||
return <Navigate to="/tenant" replace />;
|
||||
}
|
||||
|
||||
export function AppRouter() {
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user