diff --git a/src/App.js b/src/App.js index 762ebd9..84941c9 100644 --- a/src/App.js +++ b/src/App.js @@ -1,20 +1,31 @@ import './App.css'; import './_sass/index.scss'; -import MenuComponent from './components/MenuComponent/index'; -import MainCard from './components/MainCard/MainCard'; -import ProjectsCard from './components/ProjectsCard'; -import ContactCard from './components/ContactCard'; -import FooterCard from './components/FooterCard'; +import { lazy, Suspense } from 'react'; + + +const MenuComponent = lazy(() => import('./components/MenuComponent/index')); +const MainCard = lazy(() => import('./components/MainCard/MainCard')); +const ProjectsCard = lazy(() => import('./components/ProjectsCard')); +const ContactCard = lazy(() => import('./components/ContactCard')); +const FooterCard = lazy(() => import('./components/FooterCard')); + +const renderLoader = () =>

Loading

; function App() { return (
- - - - - + + + + + + + + + + +
); }