From 58a05c7cdf323efdeda73de5028330d2fc3c7058 Mon Sep 17 00:00:00 2001 From: hobokenchicken Date: Sat, 18 Apr 2026 17:09:16 -0400 Subject: [PATCH] Add working mobile hamburger menu --- src/components/NavBar.tsx | 53 ++++++++++++++++++++++++++++++++++----- 1 file changed, 47 insertions(+), 6 deletions(-) diff --git a/src/components/NavBar.tsx b/src/components/NavBar.tsx index a0cf0e4..3322977 100644 --- a/src/components/NavBar.tsx +++ b/src/components/NavBar.tsx @@ -1,3 +1,6 @@ +import { useState } from 'react' +import { Menu, X } from 'lucide-react' + type NavItem = { href: string; label: string } const navItems: NavItem[] = [ @@ -9,12 +12,25 @@ const navItems: NavItem[] = [ ] export default function NavBar() { + const [isOpen, setIsOpen] = useState(false) + + const handleClick = (href: string) => { + setIsOpen(false) + // Smooth scroll to section + const element = document.querySelector(href) + if (element) { + element.scrollIntoView({ behavior: 'smooth' }) + } + } + return (
+ + {/* Mobile menu overlay */} + {isOpen && ( +
+ +
+ )}
) }