import { useNavigate, useLocation } from 'react-router-dom'; import { Award, Settings, HelpCircle, X } from 'lucide-react'; import { GrHomeRounded } from "react-icons/gr"; import { MdOutlineAssignment, MdLogout } from "react-icons/md"; import { HiUser } from "react-icons/hi2"; const navItems = [ { label: "Home", icon: GrHomeRounded, path: "/intern" }, { label: "List Projects", icon: MdOutlineAssignment, path: "/intern/projects" }, { label: "Certificates", icon: Award, path: "/intern/certificates" }, ]; const prefItems = [ { label: "Settings", icon: Settings, path: "/intern/settings" }, { label: "FAQ", icon: HelpCircle, path: "/intern/faq" }, { label: "Logout", icon: MdLogout, path: "/login-internify", danger: true, isLogout: true }, ]; interface SidebarProps { isOpen: boolean; closeSidebar: () => void; } export default function SidebarIntern({ isOpen, closeSidebar }: SidebarProps) { const navigate = useNavigate(); const location = useLocation(); const handleNav = (path: string) => { navigate(path); closeSidebar(); }; const handleLogout = () => { document.cookie = "token=; path=/; max-age=86400; SameSite=Strict"; closeSidebar(); navigate("/login-internify", { replace: true }); }; return ( ); }