forked from realstoman/react-tailwindcss-portfolio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
40 lines (37 loc) · 1.16 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
import { BrowserRouter as Router, Routes, Route } from 'react-router-dom';
import ScrollToTop from './components/ScrollToTop';
import AppFooter from './components/shared/AppFooter';
import AppHeader from './components/shared/AppHeader';
import './css/App.css';
import About from './pages/AboutMe';
import Contact from './pages/Contact';
import Home from './pages/Home';
import Projects from './pages/Projects';
import ProjectSingle from './pages/ProjectSingle';
import { AnimatePresence } from 'framer-motion';
import UseScrollToTop from './hooks/useScrollToTop';
function App() {
return (
<AnimatePresence>
<div className=" bg-secondary-light dark:bg-primary-dark transition duration-300">
<Router>
<ScrollToTop />
<AppHeader />
<Routes>
<Route path="/" element={<Home />} />
<Route path="projects" element={<Projects />} />
<Route
path="projects/single-project"
element={<ProjectSingle />}
/>
<Route path="about" element={<About />} />
<Route path="contact" element={<Contact />} />
</Routes>
<AppFooter />
</Router>
<UseScrollToTop />
</div>
</AnimatePresence>
);
}
export default App;