From 167489a96d5d42d56368f0969c81dbc7bf5967bd Mon Sep 17 00:00:00 2001
From: joonhoekim <26rote@gmail.com>
Date: Fri, 28 Nov 2025 14:14:11 +0900
Subject: (김준회) 메뉴 네비게이션: 요구사항 반영(박진석 프로)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 components/layout/GroupedMenuRender.tsx | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

(limited to 'components/layout/GroupedMenuRender.tsx')

diff --git a/components/layout/GroupedMenuRender.tsx b/components/layout/GroupedMenuRender.tsx
index b56135eb..4cc0ab88 100644
--- a/components/layout/GroupedMenuRender.tsx
+++ b/components/layout/GroupedMenuRender.tsx
@@ -15,9 +15,10 @@ interface GroupedMenuRendererProps {
   lng: string;
   activeMenus?: Record<string, boolean>;
   t: (key: string) => string; // 번역 함수 추가
+  onItemClick?: () => void;
 }
 
-const GroupedMenuRenderer = ({ items, lng, activeMenus = {}, t }: GroupedMenuRendererProps) => {
+const GroupedMenuRenderer = ({ items, lng, activeMenus = {}, t, onItemClick }: GroupedMenuRendererProps) => {
   // 활성 메뉴만 필터링 (activeMenus가 빈 객체면 모든 메뉴 표시)
   const filteredItems = Object.keys(activeMenus).length > 0 
     ? filterActiveAdditionalMenus(items, activeMenus)
@@ -65,7 +66,7 @@ const GroupedMenuRenderer = ({ items, lng, activeMenus = {}, t }: GroupedMenuRen
             )}
             <div className="grid grid-cols-2 gap-3">
               {groupedItems[groupName].map((item) => (
-                <MenuListItem key={item.titleKey} item={item} lng={lng} t={t} />
+                <MenuListItem key={item.titleKey} item={item} lng={lng} t={t} onClick={onItemClick} />
               ))}
             </div>
           </div>
@@ -75,11 +76,12 @@ const GroupedMenuRenderer = ({ items, lng, activeMenus = {}, t }: GroupedMenuRen
   );
 };
 
-const MenuListItem = ({ item, lng, t }: { item: MenuItem; lng: string; t: (key: string) => string }) => {
+const MenuListItem = ({ item, lng, t, onClick }: { item: MenuItem; lng: string; t: (key: string) => string; onClick?: () => void }) => {
   return (
     <NavigationMenuLink asChild>
       <Link
         href={`/${lng}${item.href}`}
+        onClick={onClick}
         className={cn(
           "flex items-start space-x-2 rounded-md p-3 leading-none no-underline outline-none transition-colors",
           "hover:bg-accent hover:text-accent-foreground",
-- 
cgit v1.2.3

