'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', '/#about'], ['Network', '/#network'], ['Deploy', '/#deploy'], ['LLMs', '/#llms'], ['Features', '/#features'], ['Get Started', '/#get-started'], ].map(([label, href], index) => ( { if (timeoutRef.current) { window.clearTimeout(timeoutRef.current) } setHoveredIndex(index) }} onMouseLeave={() => { timeoutRef.current = window.setTimeout(() => { setHoveredIndex(null) }, 200) }} > {hoveredIndex === index && ( )} {label} )) }