|
a |
|
b/client/src/App.jsx |
|
|
1 |
import Header from "./components/Header"; |
|
|
2 |
import Nav from "./components/Nav"; |
|
|
3 |
import Dashboard from "./components/Dashboard"; |
|
|
4 |
import SelectedContext from "./Contexts"; |
|
|
5 |
import { useState } from "react"; |
|
|
6 |
|
|
|
7 |
function App() { |
|
|
8 |
const [selected, setSelected] = useState(1); |
|
|
9 |
return ( |
|
|
10 |
<SelectedContext.Provider value={{selected, setSelected}}> |
|
|
11 |
<div> |
|
|
12 |
<Header /> |
|
|
13 |
<div className="flex"> |
|
|
14 |
<Nav /> |
|
|
15 |
<Dashboard /> |
|
|
16 |
</div> |
|
|
17 |
</div> |
|
|
18 |
</SelectedContext.Provider> |
|
|
19 |
); |
|
|
20 |
} |
|
|
21 |
|
|
|
22 |
export default App; |