diff --git a/src/Header/Nav/index.tsx b/src/Header/Nav/index.tsx index 8ebbd88..a7576a7 100644 --- a/src/Header/Nav/index.tsx +++ b/src/Header/Nav/index.tsx @@ -7,12 +7,30 @@ import { CMSLink } from '@/components/Link' export const HeaderNav: React.FC<{ data: HeaderType }> = ({ data }) => { const navItems = data?.navItems || [] + // Optional: Function to handle smooth scroll override if needed + const handleNavClick = (e: React.MouseEvent, href: string) => { + if (href.startsWith('#')) { + const element = document.querySelector(href) + if (element) { + e.preventDefault() + element.scrollIntoView({ behavior: 'smooth' }) + // Update URL hash without jumping + history.pushState(null, '', href) + } + } + } + return (