Skip to content

Commit

Permalink
initial branch commit
Browse files Browse the repository at this point in the history
  • Loading branch information
nathan-gt committed Mar 15, 2024
1 parent ae0b81a commit 110911b
Show file tree
Hide file tree
Showing 5 changed files with 109 additions and 46 deletions.
106 changes: 65 additions & 41 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
"date-fns": "^2.28.0",
"electron-log": "^4.4.6",
"execa": "^6.1.0",
"fs.promises": "^0.1.2",
"lodash": "^4.17.21",
"nanoid": "^3.3.1",
"node-rtsp-stream": "^0.0.9",
Expand All @@ -65,6 +66,7 @@
"react": "^17.0.2",
"react-battery-gauge": "^1.0.5",
"react-dom": "^17.0.2",
"react-dropdown": "^1.11.0",
"react-icons": "^4.3.1",
"react-redux": "^7.2.6",
"react-router": "^6.2.2",
Expand Down
29 changes: 29 additions & 0 deletions src/renderer/components/Dropdown/dropdown.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import React from 'react';


interface robot {
name: string
}

function BasicExample() {

const robot: robot[] = [
{
name:"rove",
},
{
name:"markhor",
},
]
return (
<div>
<select>
{robot.map((robot) => (
<option value={robot.name}>{robot.name}</option>
))}
</select>
</div>
);
}

export default BasicExample;
2 changes: 2 additions & 0 deletions src/renderer/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import BatteryStatus from './BatteryStatus/BatteryStatus';
import GpioPinsStatus from './GpioPinsStatus/GpioPinsStatus';
import { ExplorationStatus } from './ExplorationStatus/ExplorationStatus';
import { CountdownStatus } from './CountdownStatus/CountdownStatus';
import BasicExample from './Dropdown/dropdown';

interface NavLinkDefinition {
to: string;
Expand Down Expand Up @@ -50,6 +51,7 @@ export const Header: FC = () => {
))}
</LeftHeader>
<RightHeader>
<BasicExample/>
<CountdownStatus />
<ExplorationStatus />
<GpioPinsStatus />
Expand Down
16 changes: 11 additions & 5 deletions src/renderer/components/Router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,17 @@ export const Router: FC = () => {
return (
<>
<Routes>
<Route path="/" element={<Navigate to="/teleop" />} />
<Route path="/teleop" element={<Teleop />} />
<Route path="/victim" element={<Victim />} />
<Route path="/config/*" element={<ConfigPage />} />
<Route path="/debug" element={<Debug />} />
<Route path="/markhor" element={<Navigate to="/markhor/teleop" />} />
<Route path="/markhor/teleop" element={<Teleop />} />
<Route path="/markhor/victim" element={<Victim />} />
<Route path="/markhor/config/*" element={<ConfigPage />} />
<Route path="/markhor/debug" element={<Debug />} />
<Route path="/" element={<Navigate to="/markhor/teleop" />} />
<Route path="/rove" element={<Navigate to="/rove/teleop" />} />
<Route path="/rove/teleop" element={<Teleop />} />
<Route path="/rove/victim" element={<Victim />} />
<Route path="/rove/config/*" element={<ConfigPage />} />
<Route path="/rove/debug" element={<Debug />} />
</Routes>
</>
);
Expand Down

0 comments on commit 110911b

Please sign in to comment.