diff --git a/src/App.tsx b/src/App.tsx index 6617473..c1aba46 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,24 +1,53 @@ +import React from 'react' import { createBrowserRouter, RouterProvider } from 'react-router-dom' +import { Backdrop, CircularProgress } from '@mui/material' -import { MainPage, ContactPage, ErrorPage, CurriculumPage, ProjectsPage } from 'components/pages' +import { ErrorPage } from 'components/pages' + +const MainPage = React.lazy(() => import('components/pages/MainPage')) +const ProjectsPage = React.lazy(() => import('components/pages/ProjectsPage')) +const CurriculumPage = React.lazy(() => import('components/pages/CurriculumPage')) +const ContactPage = React.lazy(() => import('components/pages/ContactPage')) + +const Loading = () => ( + + + +) const router = createBrowserRouter([ { path: '/', - element: , + element: ( + }> + + + ), errorElement: , }, { path: '/projects', - element: , + element: ( + }> + + + ), }, { path: '/curriculum', - element: , + element: ( + }> + + + ), }, { path: '/contacts', - element: , + element: ( + }> + + + ), }, ])