'use client' import { useRef, useState } from 'react' import Link from 'next/link' import { AnimatePresence, motion } from 'framer-motion' export function NavLinks() { let [hoveredIndex, setHoveredIndex] = useState(null) let timeoutRef = useRef(null) return [ ['About', '/#home-about'], ['Marketplace', '/#companies'], ['Technology', '/#stack-section'], ['How it works', '/#steps'], ['Use Cases', '/#clickable-gallery'], ['Coming Soon', '/#use-cases'], ['Get Started', '/#call-to-action'], ['FAQs', '/#faqs'], ].map(([label, href], index) => ( { if (timeoutRef.current) { window.clearTimeout(timeoutRef.current) } setHoveredIndex(index) }} onMouseLeave={() => { timeoutRef.current = window.setTimeout(() => { setHoveredIndex(null) }, 200) }} > {hoveredIndex === index && ( )} {label} )) }