From 89dc5364d1e791c0a29a18678a38f731fba46eb4 Mon Sep 17 00:00:00 2001 From: gahusb Date: Thu, 11 Jun 2026 01:48:24 +0900 Subject: [PATCH] =?UTF-8?q?fix(nav):=20=EB=AA=A8=EB=B0=94=EC=9D=BC=20?= =?UTF-8?q?=EB=93=9C=EB=A1=9C=EC=96=B4=20=EC=A0=91=EA=B7=BC=EC=84=B1=20(ar?= =?UTF-8?q?ia-expanded=C2=B7Esc=C2=B7dialog=20role)=20+=20hover=20?= =?UTF-8?q?=ED=81=B4=EB=9E=98=EC=8A=A4=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 4.6 --- app/components/TopNav.tsx | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/app/components/TopNav.tsx b/app/components/TopNav.tsx index 103553e..f50a7e7 100644 --- a/app/components/TopNav.tsx +++ b/app/components/TopNav.tsx @@ -58,6 +58,13 @@ export default function TopNav() { } }, [open]); + useEffect(() => { + if (!open) return; + const onKey = (e: KeyboardEvent) => { if (e.key === 'Escape') setOpen(false); }; + window.addEventListener('keydown', onKey); + return () => window.removeEventListener('keydown', onKey); + }, [open]); + const isActive = (href: string) => { if (href === '/') return pathname === '/'; return pathname === href || pathname.startsWith(href + '/'); @@ -143,15 +150,13 @@ export default function TopNav() { )} { (e.currentTarget as HTMLElement).style.background = 'var(--jsm-accent-hover)'; }} - onMouseLeave={(e) => { (e.currentTarget as HTMLElement).style.background = 'var(--jsm-accent)'; }} > 프로젝트 문의 @@ -160,6 +165,7 @@ export default function TopNav() {