Hide navigation item but redirect to it when switching tenants

I have a multi-tenant app with mostly custom pages (outside of multi-tenancy, regular routes/web.php pages). When I switch tenants I have to save it to the database. But without any tenant-aware pages I do not have access to the new tenant. What I found out is that Filament is redirecting users to the first navigation item that is visible. I've created a tenant-aware page as a hack, that saves the current tenant in the mount method and redirects the user to other non-tenant page. The problem is, it needs to be present in the navigation which is not going to happen. I've also tried custom navigation builder, but it also gets the first visible item. Have anyone done something similar or is there a better way to save a tenant after switch?
1 Reply
Krzysztof
KrzysztofOP7mo ago
For now this will do, I guess:
.fi-topbar-item:nth-child(1) {
display: none !important;
}
.fi-topbar-item:nth-child(1) {
display: none !important;
}
Want results from more Discord servers?
Add your server