diff --git a/src/routes/Routers/index.tsx b/src/routes/Routers/index.tsx index af8aeac..9b31425 100644 --- a/src/routes/Routers/index.tsx +++ b/src/routes/Routers/index.tsx @@ -1,28 +1,50 @@ -import { App } from 'antd' +import { Spin } from 'antd' +import { Suspense, lazy } from 'react' import { Route, Routes } from 'react-router-dom' -import ErrorPage from '@components/ErrorPage' import Layout from '@components/Layout' -import HomePages from '@pages/HomePage' -import LoginPage from '@pages/LoginPage' +import HomePage from '@pages/HomePage' import PrivateRoute from '@routes/PrivateRoute' import { routePaths } from '@routes/routePaths.ts' +const LoginPage = lazy(() => import('@pages/LoginPage')) + +const ErrorPage = lazy(() => import('@components/ErrorPage')) + const Routers = () => { return ( - - - }> - }> - } /> - + + }> + }> + }> + + + } + /> - } /> - } /> - - + + }> + + + } + /> + }> + + + } + /> + ) }