56 lines
1.3 KiB
TypeScript
56 lines
1.3 KiB
TypeScript
import { createBrowserRouter, Navigate } from "react-router-dom";
|
|
import Layout from "./components/Layout";
|
|
import LandingPage from "./components/landingpage/landingpage";
|
|
import { LandingBase } from "./components/landingpage/landingpagebase";
|
|
import { MottoBase } from "./components/mottopage/mottobase";
|
|
import MottoSection from "./components/mottopage/MottoSection";
|
|
import AboutUsPage from "./components/aboutus";
|
|
|
|
const router = createBrowserRouter([
|
|
{
|
|
path: '',
|
|
element: <Layout />,
|
|
children: [
|
|
{
|
|
index: true,
|
|
element: <Navigate to='home' />,
|
|
},
|
|
{
|
|
path: 'home',
|
|
element: <LandingBase />,
|
|
children: [
|
|
{
|
|
index: true,
|
|
element: <LandingPage />,
|
|
},
|
|
],
|
|
},
|
|
{
|
|
path: 'aboutUs',
|
|
element: <LandingBase />,
|
|
children: [
|
|
{
|
|
index: true,
|
|
element: <AboutUsPage />,
|
|
},
|
|
],
|
|
},
|
|
{
|
|
path: 'motto',
|
|
element: <MottoBase />,
|
|
children: [
|
|
{
|
|
index: true,
|
|
element: <MottoSection />,
|
|
},
|
|
],
|
|
}
|
|
|
|
|
|
]
|
|
},
|
|
|
|
]);
|
|
|
|
export default router;
|
|
|