-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.jsx
48 lines (43 loc) · 1.39 KB
/
App.jsx
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
import { BrowserRouter as Router, Route, Link, Routes } from "react-router-dom";
import Home from "./Home";
import Balance from "./examples/Balance";
import Deposit from "./examples/Deposit";
import Withdraw from "./examples/Withdraw";
import Vaults from "./examples/Vaults";
import "./styles.scss";
export default function App() {
const navLinks = [
{ to: "/", name: "Home", className: "header" },
{ to: "/balance", name: "Balances" },
{ to: "/deposit", name: "Deposit" },
{ to: "/withdraw", name: "Withdraw" },
{ to: "/vaults", name: "Vaults" },
];
return (
<Router>
<div className="App">
<div className="sidenav">
<ul>
{navLinks.map((link) => {
return (
<li key={link.name} className={link.className ?? null}>
<Link to={link.to}>{link.name}</Link>
</li>
);
})}
</ul>
</div>
<div className="content">
<h1>Yearn SDK Integration Examples</h1>
<Routes>
<Route exact path="/" element={<Home />} />
<Route path="/balance" element={<Balance />} />
<Route path="/deposit" element={<Deposit />} />
<Route path="/withdraw" element={<Withdraw />} />
<Route path="/vaults" element={<Vaults />} />
</Routes>
</div>
</div>
</Router>
);
}