import { lazy } from "react"; import { RouteObject } from "react-router-dom"; import InitPage from "../pages/init"; const LoginPage = lazy(() => import("../pages/login")); const HomePage = lazy(() => import("../pages/home")); const DashboardPage = lazy(() => import("../pages/dashboard")); const ErrorPage = lazy(() => import("../pages/error")); const CoursePage = lazy(() => import("../pages/course")); const TestPage = lazy(() => import("../pages/test")); const MemberPage = lazy(() => import("../pages/member")); const MemberImportPage = lazy(() => import("../pages/member/import")); const SystemAdministratorPage = lazy( () => import("../pages/system/administrator") ); const SystemAdminrolesPage = lazy(() => import("../pages/system/adminroles")); const DepartmentPage = lazy(() => import("../pages/department")); const ChangePasswordPage = lazy(() => import("../pages/change-password")); const ResourceImagesPage = lazy(() => import("../pages/resource/images")); const ResourceCategoryPage = lazy( () => import("../pages/resource/resource-category") ); const ResourceVideosPage = lazy(() => import("../pages/resource/videos")); const SystemConfigPage = lazy(() => import("../pages/system/config")); const routes: RouteObject[] = [ { path: "/", element: , children: [ { path: "/", element: , children: [ { path: "/", element: , }, { path: "/change-password", element: , }, { path: "/resource-category", element: , }, { path: "/images", element: , }, { path: "/videos", element: , }, { path: "/course", element: , }, { path: "/member", element: , }, { path: "/member/import", element: , }, { path: "/system/config/index", element: , }, { path: "/system/administrator", element: , }, { path: "/system/adminroles", element: , }, { path: "/department", element: , }, ], }, { path: "/login", element: , }, { path: "/test", element: , }, { path: "*", element: , }, ], }, ]; export default routes;