diff --git a/src/Router.jsx b/src/Router.jsx index 8e14f17..cd9570f 100644 --- a/src/Router.jsx +++ b/src/Router.jsx @@ -32,6 +32,45 @@ import SolutionKtGcloudPage from "./pages/solution/KtGcloudPage"; import ContactInquiryPage from "./pages/contact/InquiryPage"; import ContactRecruitPage from "./pages/contact/RecruitPage"; +// 서브 페이지 라우트 목록 (ko 기준 경로). renderSubRoutes()에서 "/en" prefix를 붙여 재사용한다. +const subRouteList = [ + { path: "/company", redirectTo: "/company/about" }, + { path: "/company/about", element: }, + { path: "/company/cert", element: }, + { path: "/company/history", element: }, + { path: "/company/partners", element: }, + { path: "/company/location", element: }, + + { path: "/utm", redirectTo: "/utm/intro" }, + { path: "/utm/intro", element: }, + { path: "/utm/case", element: }, + + { path: "/business", redirectTo: "/business/si" }, + { path: "/business/si", element: }, + { path: "/business/rnd", element: }, + { path: "/business/maintenance", element: }, + + { path: "/solution", redirectTo: "/solution/flight-control" }, + { path: "/solution/flight-control", element: }, + { path: "/solution/ibe", element: }, + { path: "/solution/smart-tour", element: }, + { path: "/solution/kt-gcloud", element: }, + + { path: "/contact", redirectTo: "/contact/inquiry" }, + { path: "/contact/inquiry", element: }, + { path: "/contact/recruit", element: }, +]; + +function renderSubRoutes(prefix = "") { + return subRouteList.map(({ path, element, redirectTo }) => { + const fullPath = prefix + path; + if (redirectTo) { + return } />; + } + return ; + }); +} + function Router() { return ( @@ -41,61 +80,13 @@ function Router() { {/* 메인 페이지 */} }> } /> + } /> - {/* 서브 페이지 */} + {/* 서브 페이지 (ko + en) */} }> - {/* Company */} - } - /> - } /> - } /> - } /> - } /> - } /> - - {/* UTM/UATM */} - } /> - } /> - } /> - - {/* Business */} - } - /> - } /> - } /> - } - /> - - {/* Solution */} - } - /> - } - /> - } /> - } - /> - } /> - - {/* Contact Us */} - } - /> - } /> - } /> + {renderSubRoutes()} + {renderSubRoutes("/en")} {/* 404: 잘못된 경로는 메인으로 */} diff --git a/src/components/Footer.jsx b/src/components/Footer.jsx index ed15419..531f291 100644 --- a/src/components/Footer.jsx +++ b/src/components/Footer.jsx @@ -1,10 +1,12 @@ import { Link } from "react-router-dom"; +import { useLanguage } from "../context/LanguageContext"; -const footerNav = [ +const footerNavKo = [ { title: "COMPANY", items: [ { label: "회사소개", to: "/company/about" }, + { label: "인증 및 특허현황", to: "/company/cert" }, { label: "연혁", to: "/company/history" }, { label: "고객 및 협력사", to: "/company/partners" }, { label: "찾아오시는 길", to: "/company/location" }, @@ -13,8 +15,8 @@ const footerNav = [ { title: "UTM/UATM", items: [ - { label: "소개", to: "/UTM/intro" }, - { label: "도입사례", to: "/UTM/case" }, + { label: "소개", to: "/utm/intro" }, + { label: "도입사례", to: "/utm/case" }, ], }, { @@ -43,13 +45,74 @@ const footerNav = [ }, ]; +const footerNavEn = [ + { + title: "COMPANY", + items: [ + { label: "About Us", to: "/company/about" }, + { label: "Certifications & Patents", to: "/company/cert" }, + { label: "History", to: "/company/history" }, + { label: "Clients & Partners", to: "/company/partners" }, + { label: "Location", to: "/company/location" }, + ], + }, + { + title: "UTM/UATM", + items: [ + { label: "Overview", to: "/utm/intro" }, + { label: "Case Studies", to: "/utm/case" }, + ], + }, + { + title: "BUSINESS", + items: [ + { label: "System Integration", to: "/business/si" }, + { label: "R&D", to: "/business/rnd" }, + { label: "Maintenance", to: "/business/maintenance" }, + ], + }, + { + title: "SOLUTION", + items: [ + { label: "Flight Control System", to: "/solution/flight-control" }, + { label: "IBE", to: "/solution/ibe" }, + // { label: "Smart Tourism Booking", to: "/solution/smart-tour" }, + // { label: "KT G-cloud Incheon Distributor", to: "/solution/kt-gcloud" }, + ], + }, + { + title: "CONTACT", + items: [ + { label: "Inquiry", to: "/contact/inquiry" }, + { label: "Careers", to: "/contact/recruit" }, + ], + }, +]; + +const INFO_TEXT = { + ko: { + ceo: "대표. 최현식", + bizNo: "사업자등록번호. 393-81-00110", + address: "인천광역시 서구 로봇랜드로 155-11 로봇랜드 14층 1401~2호", + }, + en: { + ceo: "CEO. Choi Hyun-sik", + bizNo: "Biz. Reg. No. 393-81-00110", + address: "14F, 1401-2, 155-11 Robot Land-ro, Seo-gu, Incheon, Republic of Korea", + }, +}; + function Footer() { + const { lang, withLang } = useLanguage(); + const footerNav = lang === "en" ? footerNavEn : footerNavKo; + const info = INFO_TEXT[lang]; + return (