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: ".me()" }, { link: "/#experience", title: ".experience()" }, { link: "/#contact", title: ".contact()" }, ]; const menuUI = menu.map((item) => { let className = "drop-shadow-light hover:drop-shadow-doublelight"; if (location.pathname === item.link) { className += " text-white"; } else { className += " text-white/40"; } return (