import { Link, useLocation } from "react-router-dom"; import { useState, useEffect } from "react"; import { Divide as Hamburger } from "hamburger-react"; function Header() { const [isOpen, setOpen] = useState(false); const menuTimeout = 400; const location = useLocation(); useEffect(() => { document.body.style.overflow = isOpen ? "hidden" : "unset"; }, [isOpen]); const menu = [ { link: "/#about", title: ".about( )" }, { link: "/#experience", title: ".projects( )" }, { link: "/#contact", title: ".contact( )" }, ]; const menuUI = menu.map((item) => { let className = "drop-shadow-doublelight hover:drop-shadow-active"; console.log(location); if (`/${location.hash}` === item.link) { className += " text-white "; } else { className += " text-gray-500"; } return (