Skip to content

Commit f6bebc1

Browse files
committed
Added dynamics page and react router
1 parent dd20036 commit f6bebc1

File tree

4 files changed

+51
-1
lines changed

4 files changed

+51
-1
lines changed

control-station/package-lock.json

Lines changed: 39 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

control-station/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"dependencies": {
1515
"react": "^18.2.0",
1616
"react-dom": "^18.2.0",
17+
"react-router-dom": "^6.23.1",
1718
"socket.io-client": "^4.7.2"
1819
},
1920
"devDependencies": {

control-station/src/App.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import { ControlPanel, Navbar } from "@/components";
22
import usePodData from "./services/usePodData";
33
import PodContext from "./services/PodContext";
4+
import { BrowserRouter, Routes, Route } from "react-router-dom";
45
import { Dashboard } from "@/views";
6+
import Dynamics from "./components/Dynamics/Dynamics";
57

68
function App() {
79
const { podData, podSocketClient } = usePodData();
@@ -10,7 +12,12 @@ function App() {
1012
<main>
1113
<PodContext.Provider value={{ podData, podSocketClient }}>
1214
<Navbar />
13-
<Dashboard />
15+
<BrowserRouter>
16+
<Routes>
17+
<Route path="/" element={<Dashboard />} />
18+
<Route path="/dynamics" element={<Dynamics />} />
19+
</Routes>
20+
</BrowserRouter>
1421
<ControlPanel />
1522
</PodContext.Provider>
1623
</main>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export default function Dynamics() {
2+
return <div>Dynamics</div>;
3+
}

0 commit comments

Comments
 (0)