'use client'; import {useEffect, useState} from 'react'; import Link from 'next/link'; import Links from '@/data/Links'; import {usePathname} from 'next/navigation'; export default function Navbar() { const [scrolled, setScrolled] = useState(false); const pathname = usePathname(); const isRoot = pathname === '/'; useEffect(() => { const handleScroll = () => { setScrolled(window.scrollY > 30); }; window.addEventListener('scroll', handleScroll); return () => window.removeEventListener('scroll', handleScroll); }, []); const isActiveScrolled = scrolled || !isRoot; return ( ); }