'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 (
{/*

Logo

*/}

useRouterWithEvents()

setNav(!nav)} className="cursor-pointer pr-4 z-10 text-gray-500 md:hidden" >
{nav && ( )}
); }; export default Navbar;