"use client"; import React from "react"; import Link from "next/link"; import { usePathname, useRouter } from "next/navigation"; import { Home, Rocket, Grid, Layers, LogOut, User, Wand2 } from "lucide-react"; import { useAuthStore } from "@/store/authStore"; import { Button } from "@/components/ui/Button"; export const Header: React.FC = () => { const pathname = usePathname(); const router = useRouter(); const { isAuthenticated, user, logout } = useAuthStore(); const navItems = [ { href: "/", label: "Dashboard", icon: Home }, { href: "/generate", label: "Generate", icon: Rocket }, { href: "/creative/modify", label: "Modify", icon: Wand2 }, { href: "/gallery", label: "Gallery", icon: Grid }, { href: "/matrix", label: "Matrix", icon: Layers }, ]; const handleLogout = () => { logout(); router.push("/login"); }; return (
PsyAdGenesis
{isAuthenticated ? (
{user?.username}
) : ( pathname !== "/login" && ( ) )}
); };