You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
84 lines
3.4 KiB
84 lines
3.4 KiB
import { Routes, Route, Navigate } from "react-router-dom"; |
|
|
|
import MainLayout from "./components/MainLayout"; |
|
import SubLayout from "./components/SubLayout"; |
|
|
|
// Main |
|
import MainPage from "./pages/MainPage"; |
|
|
|
// Company |
|
import CompanyAboutPage from "./pages/company/AboutPage"; |
|
import CompanyHistoryPage from "./pages/company/HistoryPage"; |
|
import CompanyPartnersPage from "./pages/company/PartnersPage"; |
|
import CompanyLocationPage from "./pages/company/LocationPage"; |
|
|
|
// UAM/UATM |
|
import UamIntroPage from "./pages/uam/IntroPage"; |
|
import UamCasePage from "./pages/uam/CasePage"; |
|
|
|
// Business |
|
import BusinessSiPage from "./pages/business/SiPage"; |
|
import BusinessRndPage from "./pages/business/RndPage"; |
|
import BusinessMaintenancePage from "./pages/business/MaintenancePage"; |
|
|
|
// Solution |
|
import SolutionFlightControlPage from "./pages/solution/FlightControlPage"; |
|
import SolutionIbePage from "./pages/solution/IbePage"; |
|
import SolutionSmartTourPage from "./pages/solution/SmartTourPage"; |
|
import SolutionKtGcloudPage from "./pages/solution/KtGcloudPage"; |
|
|
|
// Contact |
|
import ContactInquiryPage from "./pages/contact/InquiryPage"; |
|
import ContactRecruitPage from "./pages/contact/RecruitPage"; |
|
|
|
function Router() { |
|
return ( |
|
<Routes> |
|
{/* 루트 진입 시 메인으로 리다이렉트 */} |
|
<Route path="/" element={<Navigate to="/main" replace />} /> |
|
|
|
{/* 메인 페이지 */} |
|
<Route element={<MainLayout />}> |
|
<Route path="/main" element={<MainPage />} /> |
|
</Route> |
|
|
|
{/* 서브 페이지 */} |
|
<Route element={<SubLayout />}> |
|
{/* Company */} |
|
<Route path="/company" element={<Navigate to="/company/about" replace />} /> |
|
<Route path="/company/about" element={<CompanyAboutPage />} /> |
|
<Route path="/company/history" element={<CompanyHistoryPage />} /> |
|
<Route path="/company/partners" element={<CompanyPartnersPage />} /> |
|
<Route path="/company/location" element={<CompanyLocationPage />} /> |
|
|
|
{/* UAM/UATM */} |
|
<Route path="/uam" element={<Navigate to="/uam/intro" replace />} /> |
|
<Route path="/uam/intro" element={<UamIntroPage />} /> |
|
<Route path="/uam/case" element={<UamCasePage />} /> |
|
|
|
{/* Business */} |
|
<Route path="/business" element={<Navigate to="/business/si" replace />} /> |
|
<Route path="/business/si" element={<BusinessSiPage />} /> |
|
<Route path="/business/rnd" element={<BusinessRndPage />} /> |
|
<Route path="/business/maintenance" element={<BusinessMaintenancePage />} /> |
|
|
|
{/* Solution */} |
|
<Route path="/solution" element={<Navigate to="/solution/flight-control" replace />} /> |
|
<Route path="/solution/flight-control" element={<SolutionFlightControlPage />} /> |
|
<Route path="/solution/ibe" element={<SolutionIbePage />} /> |
|
<Route path="/solution/smart-tour" element={<SolutionSmartTourPage />} /> |
|
<Route path="/solution/kt-gcloud" element={<SolutionKtGcloudPage />} /> |
|
|
|
{/* Contact Us */} |
|
<Route path="/contact" element={<Navigate to="/contact/inquiry" replace />} /> |
|
<Route path="/contact/inquiry" element={<ContactInquiryPage />} /> |
|
<Route path="/contact/recruit" element={<ContactRecruitPage />} /> |
|
</Route> |
|
|
|
{/* 404: 잘못된 경로는 메인으로 */} |
|
{/* <Route path="*" element={<Navigate to="/main" replace />} /> */} |
|
</Routes> |
|
); |
|
} |
|
|
|
export default Router;
|
|
|