'use client'; import Link from "next/link"; import React, { useState } from "react"; import useRouterWithEvents from "use-router-with-events"; const Navbar = () => { const [nav, setNav] = useState(false); const router = useRouterWithEvents(); const links = [ { id: 1, link: "home", href: "/" }, { id: 2, link: "about", href: "/about" }, { id: 3, link: "portfolio", href: "/portfolio" }, { id: 5, link: "contact", href: "/contact" }, ]; return (