import { BookOpenText, CheckSquare, FileQuestion, Menu, Shirt, Video, Waypoints, } from 'lucide-react'; import { useRef, useState } from 'react'; import { cn } from '../lib/classname.ts'; import { useOutsideClick } from '../hooks/use-outside-click.ts'; const links = [ { link: '/roadmaps', label: 'Roadmaps', description: 'Step by step learning paths', Icon: Waypoints, }, { link: '/best-practices', label: 'Best Practices', description: "Do's and don'ts", Icon: CheckSquare, }, { link: '/questions', label: 'Questions', description: 'Test and Practice your knowledge', Icon: FileQuestion, }, { link: '/guides', label: 'Guides', description: 'In-depth articles and tutorials', Icon: BookOpenText, }, { link: 'https://youtube.com/@roadmapsh', label: 'Videos', description: 'Animated and interactive content', Icon: Video, isExternal: true, }, { link: 'https://cottonbureau.com/people/roadmapsh', label: 'Shop', description: 'Get some cool swag', Icon: Shirt, isExternal: true, }, ]; export function NavigationDropdown() { const dropdownRef = useRef(null); const [isOpen, setIsOpen] = useState(false); useOutsideClick(dropdownRef, () => { setIsOpen(false); }); return (
{links.map((link) => ( {link.label} {link.description} ))}
); }