This commit is contained in:
YI FANG
2025-11-26 09:50:49 +08:00
commit 8155c9f95d
43 changed files with 7687 additions and 0 deletions

24
src/router.tsx Normal file
View File

@@ -0,0 +1,24 @@
import { createBrowserRouter, Navigate } from 'react-router-dom';
import { MainLayout } from './layouts/MainLayout';
import { HomePage } from './pages/HomePage';
import { ExamPage } from './pages/ExamPage';
import { BookingPage } from './pages/BookingPage';
import { SupportPage } from './pages/SupportPage';
export const router = createBrowserRouter([
{
path: '/',
element: <MainLayout />,
children: [
{ index: true, element: <Navigate to='/home' replace /> },
{ path: 'home', element: <HomePage /> },
{ path: 'exam', element: <ExamPage /> },
{ path: 'booking', element: <BookingPage /> },
{ path: 'support', element: <SupportPage /> },
],
},
{ path: '*', element: <Navigate to='/home' replace /> },
]);