"use client"; import { useState } from "react"; import { Menu, Search, Bell, HelpCircle, X, ArrowLeft } from "lucide-react"; import { ThemeToggle } from "@/components/ThemeToggle"; import { useLayout } from "@/components/LayoutProvider"; import { usePathname, useRouter } from "next/navigation"; import Image from "next/image"; export default function Header() { const { setMobileMenuOpen } = useLayout(); const [isSearchOpen, setIsSearchOpen] = useState(false); const pathname = usePathname(); const router = useRouter(); // Only show the back button on pages NOT directly reachable via the sidebar const sidebarPaths = ['/', '/analysis', '/students', '/settings']; const showBack = !sidebarPaths.includes(pathname); return (
{/* Back Button — visible on sub-pages */} {showBack && ( )} {/* Mobile Banner */}
SEEC Analysis Banner
{/* Desktop Search (hidden on mobile) */}
{/* Mobile Search Button */}
{/* Mobile Expanded Search Overlay */} {isSearchOpen && (
)}
); }