-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.js
More file actions
40 lines (36 loc) · 1.01 KB
/
App.js
File metadata and controls
40 lines (36 loc) · 1.01 KB
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 React from 'react';
import Sidebar from './sidebar/Sidebar'
import './App.css';
import Landing from './landing/Landing';
import { Switch, Route, useLocation } from 'react-router-dom'
import Sorting from './sorting/Sorting';
import PathFinder from './path-finder/PathFinder';
import Articles from './articles/Articles';
import { AnimatePresence } from 'framer-motion';
import P5page from './p5js/P5page';
function App() {
const location = useLocation();
return (
<div className="app">
<Sidebar />
<AnimatePresence exitBeforeEnter>
<Switch location={location} key={location.key}>
<Route path="/sorting">
<Sorting />
</Route>
<Route path="/path-finder">
<PathFinder />
</Route>
<Route path="/algorithm-art">
<P5page />
</Route>
<Route exact path="/">
<Landing />
</Route>
</Switch>
</AnimatePresence>
<Articles />
</div>
);
}
export default App;