import { memo } from "react"; import { useRouter } from "next/router"; import classNames from "classnames"; import MenuLink from "../MenuLink/MenuLink"; import ThemeToggle from "../ThemeToggle/ThemeToggle"; import { HomeIcon, NotesIcon, ProjectsIcon, ContactIcon } from "../Icons"; import styles from "./Menu.module.css"; type MenuProps = { className?: string; }; const links = [ { icon: , text: "Home", href: "/", }, { icon: , text: "Notes", href: "/notes", }, { icon: , text: "Projects", href: "/projects", }, { icon: , text: "Contact", href: "/contact", }, ]; const Menu = ({ className }: MenuProps) => { const router = useRouter(); return (
    {links.map((link, index) => (
  • {/* kinda weird/hacky way to determine if the *first part* of the current path matches this href */}
  • ))}
); }; export default memo(Menu);