-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
78 lines (62 loc) · 2 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
// import "./style.css";
// import './App.css';
// import "bootstrap/dist/css/bootstrap.min.css";
// import About from './components/About/About';
// import Footer from './components/Fotter';
// import Projects from './components/Projects/Projects';
// import Home from './components/Home/Home';
// import { Navbar } from "react-bootstrap";
// import ResumeNew from "./components/Resume/ResumeNew";
// import Preloader from "./components/Preloader";
// function App() {
// return (
// <div className="App">
// <Preloader/>
// <Navbar/>
// <Home/>
// <Projects/>
// <About/>
// <ResumeNew/>
// <Footer/>
// </div>
// );
// }
// export default App;
import React, { useState, useEffect } from "react";
// import Preloader from "./components/Preloader";
import Navbar from "./components/Navbar";
import Home from "./components/Home/Home";
import About from "./components/About/About";
import Projects from "./components/Projects/Projects";
import Footer from "./components/Fotter";
import Resume from "./components/Resume/ResumeNew";
import { BrowserRouter as Router, Route, Routes} from "react-router-dom";
import "./style.css";
import "./App.css";
import "bootstrap/dist/css/bootstrap.min.css";
import ScrollToTop from "./components/ScrollToTop";
function App() {
const [load, upadateLoad] = useState(true);
useEffect(() => {
const timer = setTimeout(() => {
upadateLoad(false);
}, 1000);
return () => clearTimeout(timer);
}, []);
return (
<Router>
<div className="App">
<Navbar />
<ScrollToTop />
<Routes>
<Route exact path="/" element={<Home key="/"/>} />
<Route exact path="/project" element={<Projects key="project"/>} />
<Route exact path="/about" element={<About key="about"/>} />
<Route exact path="/resume" element={<Resume key="resume"/>} />
</Routes>
<Footer />
</div>
</Router>
);
}
export default App;