-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
36 lines (32 loc) · 1.13 KB
/
App.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import React, { lazy, Suspense} from 'react';
import Fade from 'react-reveal/Fade';
import { Route } from 'react-router-dom';
import Navbar from './components/Navbar';
import Default from './pages/Default';
import Footer from './components/Footer';
import Spinner from './components/Spinner';
import './App.css';
const Play = lazy(() => import("./pages/Play"));
const Work = lazy(() => import("./pages/Work"));
const Contact = lazy(() => import("./pages/Contact"));
const About = lazy(() => import("./pages/About"));
const Blog = lazy(() => import("./pages/Blog"));
function App() {
return (
<div className='main-container'>
<Navbar />
<Fade delay={1000} duration={3000}>
<Suspense fallback={<Spinner />}>
<Route exact path='/' component={ Default } />
<Route path='/about' component={ About } />
<Route path='/projects' component={ Work } />
<Route path='/blog' component={ Blog } />
<Route path='/play' component={ Play } />
<Route path='/contact' component={ Contact } />
</Suspense>
</Fade>
<Footer />
</div>
);
}
export default App;