"use client"; import { KeyIcon, ListIcon, LogOutIcon } from "lucide-react"; import Logo from "./logo"; import { ThemeToggler } from "./themeToggler"; import Link from "next/link"; import { Button } from "./ui/button"; import { LocaleSwitcher } from "./localeSwitcher"; import { logout } from "@/app/actions/logout"; import { useTranslations } from "next-intl"; import type { User } from "@/types/api"; interface HeaderProps { user: User | null; } export default function Header({ user }: HeaderProps) { const t = useTranslations("Header"); const handleLogout = async () => { await logout(); }; return (
{user ? ( <> ) : ( )}
); }