Aktueller Stand

This commit is contained in:
2026-01-16 23:02:36 +01:00
parent dcf45bac3d
commit b2b23268b2
14 changed files with 768 additions and 226 deletions

View File

@@ -16,6 +16,8 @@ export default function NavBar() {
const [isScrolled, setIsScrolled] = useState(false);
const [mobileOpen, setMobileOpen] = useState(false);
const [appName, setAppName] = useState("Vereinskalender");
const hideLoginPaths = new Set(["/login", "/register", "/reset"]);
const showLoginButton = !data?.user && !hideLoginPaths.has(pathname);
const linkClass = (href: string) =>
pathname === href
? "nav-link-active rounded-full px-3 py-1"
@@ -182,7 +184,7 @@ export default function NavBar() {
</svg>
Logout
</button>
) : (
) : showLoginButton ? (
<button
type="button"
onClick={() => signIn()}
@@ -190,7 +192,7 @@ export default function NavBar() {
>
Login
</button>
)}
) : null}
</nav>
<button
type="button"
@@ -232,7 +234,7 @@ export default function NavBar() {
/>
)}
<div
className={`relative z-20 overflow-hidden transition-all duration-300 md:hidden ${
className={`mobile-menu-panel relative z-20 overflow-hidden transition-all duration-300 md:hidden ${
mobileOpen ? "max-h-96 opacity-100" : "max-h-0 opacity-0"
}`}
>
@@ -275,15 +277,15 @@ export default function NavBar() {
</svg>
Logout
</button>
) : (
<button
type="button"
onClick={() => signIn()}
className="btn-accent w-full"
>
Login
</button>
)}
) : showLoginButton ? (
<button
type="button"
onClick={() => signIn()}
className="btn-accent w-full"
>
Login
</button>
) : null}
</div>
</div>
</header>