'use client'; import Link from 'next/link'; import { usePathname } from 'next/navigation'; import { useState, useEffect } from 'react'; import { Button } from '@workspace/ui/components/button'; import { Badge } from '@workspace/ui/components/badge'; import { LayoutDashboard, Users, Briefcase, Menu, X, LogOut, Settings, Bell, Search, ChevronDown } from 'lucide-react'; import { signOutAction } from './actions'; const navLinks = [ { href: '/', label: 'Dashboard', icon: LayoutDashboard, description: 'Overview and analytics' }, { href: '/students', label: 'Students', icon: Users, description: 'Manage student profiles' }, { href: '/jobs', label: 'Jobs', icon: Briefcase, description: 'Job listings and applications' }, ]; export default function MainLayout({ children }: { children: React.ReactNode }) { const pathname = usePathname(); const [isScrolled, setIsScrolled] = useState(false); const [isMobileMenuOpen, setIsMobileMenuOpen] = useState(false); const [isProfileDropdownOpen, setIsProfileDropdownOpen] = useState(false); // Handle scroll effect useEffect(() => { const handleScroll = () => { setIsScrolled(window.scrollY > 10); }; window.addEventListener('scroll', handleScroll); return () => window.removeEventListener('scroll', handleScroll); }, []); // Close mobile menu when route changes useEffect(() => { setIsMobileMenuOpen(false); }, [pathname]); return (
{/* Enhanced Sticky Navbar */}
{/* Logo Section */}
Logo
Placement Portal Admin Portal
{/* Desktop Navigation */} {/* Right Section - Search, Notifications, Profile */}
{/* Search Button */} {/* Notifications */} {/* Profile Dropdown */}
{/* Profile Dropdown Menu */} {isProfileDropdownOpen && (

Admin User

admin@nextplacement.com

)}
{/* Mobile Menu Button */}
{/* Mobile Navigation Menu */} {isMobileMenuOpen && (
)}
{/* Main Content */}
{children}
{/* Click outside to close dropdowns */} {isProfileDropdownOpen && (
setIsProfileDropdownOpen(false)} /> )}
); }