mirror of
https://github.com/okieselbach/AutopilotMonitor.git
synced 2026-10-24 04:32:32 +00:00
fix public navbar load when logged in
This commit is contained in:
@@ -1 +1 @@
|
||||
56
|
||||
57
|
||||
|
||||
@@ -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 (
|
||||
<nav
|
||||
className={`sticky top-0 z-30 backdrop-blur-md border-b shadow-sm ${
|
||||
|
||||
Reference in New Issue
Block a user