chore: merged dev into show-connected-robots
ref: N25B-142
This commit is contained in:
34
src/App.tsx
34
src/App.tsx
@@ -3,10 +3,7 @@ import { useState } from 'react'
|
||||
import './App.css'
|
||||
import TemplatePage from './pages/TemplatePage/Template.tsx'
|
||||
import Home from './pages/Home/Home.tsx'
|
||||
import ServerComms from './pages/ServerComms/ServerComms.tsx'
|
||||
import ConnectedRobots from './pages/ConnectedRobots/ConnectedRobots.tsx'
|
||||
import Logging from './pages/Logging/Logging.tsx'
|
||||
import VisProg from "./pages/VisProgPage/VisProg.tsx";
|
||||
import Robot from './pages/Robot/Robot.tsx';
|
||||
|
||||
function App(){
|
||||
|
||||
@@ -22,25 +19,16 @@ function App(){
|
||||
|
||||
return (
|
||||
<div>
|
||||
{/* Should not use inline styles like this */}
|
||||
<Link style={{position: "fixed", top: "1rem", left: "50%", translate: "-50%"}} to={"/"}>Home</Link>
|
||||
<Routes>
|
||||
<Route path="/" element={<Home />} />
|
||||
<Route path="/Template" element={<TemplatePage />} />
|
||||
<Route path="/ServerComms" element = {<ServerComms />} />
|
||||
<Route path="/visprog" element={<VisProg />} />
|
||||
<Route path="/logging" element = {<Logging />} />
|
||||
<Route
|
||||
path="/ConnectedRobots"
|
||||
// Pass the useState to the page to update from there
|
||||
element={
|
||||
<ConnectedRobots
|
||||
connectedRobots={connectedRobots}
|
||||
setConnectedRobots={setConnectedRobots}
|
||||
/>
|
||||
}
|
||||
/>
|
||||
</Routes>
|
||||
<header>
|
||||
<Link to={"/"}>Home</Link>
|
||||
</header>
|
||||
<main className={"flex-col align-center"}>
|
||||
<Routes>
|
||||
<Route path="/" element={<Home />} />
|
||||
<Route path="/template" element={<TemplatePage />} />
|
||||
<Route path="/robot" element={<Robot />} />
|
||||
</Routes>
|
||||
</main>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user