"use client" import Link from "next/link" import { usePathname } from "next/navigation" import { Suspense } from "react" import { Sparkles, Menu, X, Plus, Loader2 } from "lucide-react" import { Button } from "@/components/ui/button" import { ThemeToggle } from "@/components/ui/theme-toggle" import { UserButton } from "@/components/auth/user-button" import { NotificationBell } from "@/components/notifications/notification-center" import { OllamaSettingsModal } from "@/components/ollama/ollama-settings" import { useState } from "react" import { cn } from "@/lib/utils" const navLinks = [ { href: "/explore", label: "Explore" }, { href: "/tools", label: "Tools" }, { href: "/thunderdome", label: "Thunderdome" }, { href: "/workflows", label: "Workflows" }, { href: "/frameworks", label: "Frameworks" }, { href: "/performance", label: "Performance" }, { href: "/dashboard", label: "Dashboard" }, ] // Loading fallback for UserButton function UserButtonFallback() { return (
) } export function Header() { const pathname = usePathname() const [mobileMenuOpen, setMobileMenuOpen] = useState(false) return (
{/* Mobile Menu */}
{navLinks.map((link) => ( setMobileMenuOpen(false)} > {link.label} ))}
{/* Mobile User Button with Suspense */}
}>
) }