diff --git a/app/employe/layout.tsx b/app/employe/layout.tsx index 9371b5d..bf37252 100644 --- a/app/employe/layout.tsx +++ b/app/employe/layout.tsx @@ -2,10 +2,10 @@ import { useAuth } from "@/contexts/AuthContext"; import { useRouter } from "next/navigation"; -import { useEffect } from "react"; +import { useEffect, useState } from "react"; import { Loading } from "@/components/ui/Loading"; import toast from "react-hot-toast"; -import { Ticket, BarChart3 } from "lucide-react"; +import { Ticket, BarChart3, Menu, X } from "lucide-react"; import Link from "next/link"; import { usePathname } from "next/navigation"; import Logo from "@/components/Logo"; @@ -19,6 +19,7 @@ export default function EmployeLayout({ const { user, isAuthenticated, isLoading, logout } = useAuth(); const router = useRouter(); const pathname = usePathname(); + const [isOpen, setIsOpen] = useState(false); useEffect(() => { if (!isLoading && !isAuthenticated) { @@ -55,67 +56,104 @@ export default function EmployeLayout({ label: "Dashboard", href: "/employe/dashboard", icon: , + color: "green", }, { label: "Validation des Tickets", href: "/employe/verification", icon: , + color: "emerald", }, ]; const isActive = (href: string) => pathname === href; + const getActiveStyles = (color: string) => { + const styles: Record = { + green: "bg-gradient-to-r from-green-600 to-green-700 text-white shadow-lg shadow-green-500/30", + emerald: "bg-gradient-to-r from-emerald-600 to-teal-600 text-white shadow-lg shadow-emerald-500/30", + }; + return styles[color] || styles.green; + }; + return (
- {/* Sidebar */} -