From b24cfab15fea591d5ec125182730d4d07b6dcd2a Mon Sep 17 00:00:00 2001 From: Shawn Date: Sun, 14 Jun 2026 12:29:28 -0400 Subject: [PATCH] fix: hamburger menu sidebar slide-in animation targets sidebarRef instead of backdropRef --- src/MainMenu.jsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/MainMenu.jsx b/src/MainMenu.jsx index fd240bc..827d565 100644 --- a/src/MainMenu.jsx +++ b/src/MainMenu.jsx @@ -16,12 +16,13 @@ const MENU_ITEMS = [ ]; export default function MainMenu({ onClose, onItemSelect }) { - const overlayRef = useRef(null); + const sidebarRef = useRef(null); + const backdropRef = useRef(null); useEffect(() => { - const el = overlayRef.current; + const el = sidebarRef.current; if (!el) return; - // Trigger enter animation + // Trigger enter animation — slide sidebar into view requestAnimationFrame(() => { el.style.transform = "translateX(0)"; }); }, []); @@ -31,7 +32,7 @@ export default function MainMenu({ onClose, onItemSelect }) { return (
{/* Sidebar */}