From 92eda21e45d902663052575aaa4c4f80bfa2faea Mon Sep 17 00:00:00 2001 From: dujinkim Date: Mon, 4 Aug 2025 09:36:14 +0000 Subject: (대표님) 벤더 문서 변경사항, data-table 변경, sync 변경 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/layout/MobileMenu.tsx | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) (limited to 'components/layout/MobileMenu.tsx') diff --git a/components/layout/MobileMenu.tsx b/components/layout/MobileMenu.tsx index dc02d2e3..6cced283 100644 --- a/components/layout/MobileMenu.tsx +++ b/components/layout/MobileMenu.tsx @@ -17,17 +17,19 @@ interface MobileMenuProps { activeMenus?: Record; domainMain?: MenuSection[]; // 헤더에서 계산된 도메인별 메인 메뉴 domainAdditional?: MenuItem[]; // 헤더에서 계산된 도메인별 추가 메뉴 + t: (key: string) => string; // 번역 함수 추가 } export function MobileMenu({ - lng, - onClose, + lng, + onClose, activeMenus = {}, domainMain = [], - domainAdditional = [] + domainAdditional = [], + t }: MobileMenuProps) { const router = useRouter(); - + const handleLinkClick = (href: string) => { router.push(href); onClose(); @@ -37,7 +39,7 @@ export function MobileMenu({ const main = Object.keys(activeMenus).length > 0 ? filterActiveMenus(domainMain, activeMenus) : domainMain; - + const additional = Object.keys(activeMenus).length > 0 ? filterActiveAdditionalMenus(domainAdditional, activeMenus) : domainAdditional; @@ -55,25 +57,25 @@ export function MobileMenu({ {main.map((section: MenuSection) => ( // 섹션에 아이템이 있는 경우에만 표시 section.items.length > 0 && ( -
  • -

    {section.title}

    +
  • +

    {t(section.titleKey)}

      {section.items.map((item: MenuItem) => ( -
    • +
    • handleLinkClick(item.href)} > - {item.title} + {t(item.titleKey)} {item.label && ( {item.label} )} - {item.description && ( -

      {item.description}

      + {item.descriptionKey && ( +

      {t(item.descriptionKey)}

      )}
    • ))} @@ -81,16 +83,16 @@ export function MobileMenu({ ) ))} - + {/* 추가 네비게이션 항목 - 도메인별 활성화된 메뉴만 표시 */} {additional.map((item: MenuItem) => ( -
    • +
    • handleLinkClick(`/${lng}${item.href}`)} > - {item.title} + {t(item.titleKey)}
    • ))} -- cgit v1.2.3