/** * Dashboard Layout * * Layout with sidebar navigation for dashboard pages */ 'use client'; import { useAuth } from '@/lib/context/auth-context'; import Link from 'next/link'; import { usePathname } from 'next/navigation'; import { useState } from 'react'; import NotificationDropdown from '@/components/NotificationDropdown'; import Image from 'next/image'; export default function DashboardLayout({ children }: { children: React.ReactNode }) { const { user, logout } = useAuth(); const pathname = usePathname(); const [sidebarOpen, setSidebarOpen] = useState(false); const navigation = [ { name: 'Dashboard', href: '/dashboard', icon: '📊' }, { name: 'Bookings', href: '/dashboard/bookings', icon: '📦' }, { name: 'Search Rates', href: '/dashboard/search', icon: '🔍' }, { name: 'Search Advanced', href: '/dashboard/search-advanced', icon: '🔎' }, { name: 'My Profile', href: '/dashboard/profile', icon: '👤' }, { name: 'Organization', href: '/dashboard/settings/organization', icon: '🏢' }, { name: 'Users', href: '/dashboard/settings/users', icon: '👥' }, ]; const isActive = (href: string) => { if (href === '/dashboard') { return pathname === href; } return pathname.startsWith(href); }; return (
{user?.firstName} {user?.lastName}
{user?.email}