From 5341bab665ae85bd53d50ca00ab7350a670187f7 Mon Sep 17 00:00:00 2001 From: Oliver Kieselbach Date: Wed, 18 Feb 2026 15:37:49 +0100 Subject: [PATCH] fix public navbar load when logged in --- src/Agent/AutopilotMonitor.Agent/buildcounter.txt | 2 +- .../autopilot-monitor-web/components/PublicSiteNavbar.tsx | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Agent/AutopilotMonitor.Agent/buildcounter.txt b/src/Agent/AutopilotMonitor.Agent/buildcounter.txt index f6b91e0e..e1617e84 100644 --- a/src/Agent/AutopilotMonitor.Agent/buildcounter.txt +++ b/src/Agent/AutopilotMonitor.Agent/buildcounter.txt @@ -1 +1 @@ -56 +57 diff --git a/src/Web/autopilot-monitor-web/components/PublicSiteNavbar.tsx b/src/Web/autopilot-monitor-web/components/PublicSiteNavbar.tsx index 1bdeca25..c4a25cc1 100644 --- a/src/Web/autopilot-monitor-web/components/PublicSiteNavbar.tsx +++ b/src/Web/autopilot-monitor-web/components/PublicSiteNavbar.tsx @@ -5,10 +5,15 @@ import { useAuth } from "../contexts/AuthContext"; import { useTheme } from "../contexts/ThemeContext"; export function PublicSiteNavbar({ showSectionLinks }: { showSectionLinks: boolean }) { - const { login } = useAuth(); + const { login, isAuthenticated } = useAuth(); const { theme, toggleTheme } = useTheme(); const isDark = theme === "dark"; + // Logged-in users should only see the main authenticated app navbar. + if (isAuthenticated) { + return null; + } + return (