fix(frontend): Resolve login redirection and inject JWT token on requests

This commit is contained in:
VPS 4 Builder
2026-05-13 10:04:49 +02:00
parent e260eed28b
commit 526495db96
2 changed files with 73 additions and 88 deletions
+2 -1
View File
@@ -170,7 +170,8 @@ const App: React.FC = () => {
// Keep URL in sync when view changes programmatically via sidebar
const handleNavigate = (view: ViewKey) => {
if (isViewAllowed(view, currentRole)) {
const freshRole = HybridBackend.getCurrentRole();
if (isViewAllowed(view, freshRole)) {
setCurrentView(view);
navigate(view);
setSidebarOpen(false); // Close sidebar on mobile after navigation