diff --git a/ui/src/components/Layout.tsx b/ui/src/components/Layout.tsx index ebb9026..4808ec0 100644 --- a/ui/src/components/Layout.tsx +++ b/ui/src/components/Layout.tsx @@ -44,9 +44,11 @@ export function Layout() { refetchInterval: 30_000, }); const isTenantAdmin = scopes.has('tenant:manage'); - const onVendorRoute = location.pathname.startsWith('/vendor'); - // Vendor on vendor routes: show only TENANTS. On tenant routes: show tenant portal too (for debugging). - const showTenantPortal = isTenantAdmin && (!isVendor || !onVendorRoute); + const onTenantRoute = location.pathname.startsWith('/tenant'); + const onVendorRoute = location.pathname.startsWith('/vendor') || (isVendor && !onTenantRoute); + // Vendor on vendor routes (or neutral pages like account settings): show only vendor sidebar. + // On tenant routes: show tenant portal too (for debugging). + const showTenantPortal = isTenantAdmin && (!isVendor || onTenantRoute); // Build breadcrumbs from path const segments = location.pathname.replace(/^\//, '').split('/').filter(Boolean);