diff --git a/app/components/navbar.jsx b/app/components/navbar.jsx index 875742f..153be7e 100644 --- a/app/components/navbar.jsx +++ b/app/components/navbar.jsx @@ -1,45 +1,15 @@ -'use client'; - // @flow strict import Link from "next/link"; -import { useEffect } from "react"; -import { useRouter } from 'next/navigation'; - -function Navbar() { - const router = useRouter(); - - useEffect(() => { - const handleSmoothScroll = (e) => { - e.preventDefault(); - const href = e.currentTarget.getAttribute('href'); - const targetId = href.replace(/.*\#/, ""); - - if (targetId) { - const targetElement = document.getElementById(targetId); - if (targetElement) { - targetElement.scrollIntoView({ behavior: "smooth" }); - window.history.pushState({}, '', href); - } - } - }; - const links = document.querySelectorAll('a[href^="/#"]'); - links.forEach(link => { - link.addEventListener("click", handleSmoothScroll); - }); - - return () => { - links.forEach(link => { - link.removeEventListener("click", handleSmoothScroll); - }); - }; - }, []); +function Navbar() { return ( ); -} +}; -export default Navbar; +export default Navbar; \ No newline at end of file