Added ref login

This commit is contained in:
2026-03-15 21:41:40 +01:00 Verified
parent f42f93abbe
commit 8031e8cfd5
18 changed files with 120 additions and 138 deletions
+3 -3
View File
@@ -6,11 +6,11 @@ import { Link } from 'react-router-dom';
interface NavbarProps {
title: string;
subtitle: string;
isAdmin: boolean;
isAuthenticated: boolean;
onLogout: () => void;
}
export default function Navbar({ title, subtitle, isAdmin, onLogout }: NavbarProps) {
export default function Navbar({ title, subtitle, isAuthenticated, onLogout }: NavbarProps) {
return (
<nav className="transition-colors bg-zinc-50 dark:bg-zinc-900 border-b border-zinc-300 dark:border-zinc-800 sticky top-0 z-100 px-3 sm:px-6 py-3 sm:py-4 flex justify-between items-center shadow-md shrink-0">
<Link to="/" className="flex items-center gap-2 sm:gap-4 cursor-pointer group select-none shrink-0">
@@ -35,7 +35,7 @@ export default function Navbar({ title, subtitle, isAdmin, onLogout }: NavbarPro
</div>
<div className="flex gap-2 sm:gap-4 items-center shrink-0">
{isAdmin ? (
{isAuthenticated ? (
<>
<button onClick={onLogout} title="Sign Out" className="text-zinc-400 hover:text-red-500 transition active:scale-90 shrink-0">
<LogOut size={18} className="sm:size-5.5" />