Added devices id route parameter

This commit is contained in:
kunkliricsi 2020-11-12 18:57:27 +01:00
parent f273823c93
commit 53ff60ae5a

View File

@ -45,7 +45,7 @@ function App() {
}
const DashboardComponent = () => {
return <Typography>Dashboard</Typography>;
return <Link to="/devices/5">This is a link</Link>;
};
const DevicesComponent = () => {
@ -66,7 +66,7 @@ function App() {
<Switch>
<PublicRoute path="/login" component={AuthComponent} />
<PrivateRoute path="/" exact authenticated={authenticated} isAdmin={isAdmin} component={DashboardComponent} />
<PrivateRoute path="/devices" exact authenticated={authenticated} isAdmin={isAdmin} component={DevicesComponent} />
<PrivateRoute path="/devices/:id?" exact authenticated={authenticated} isAdmin={isAdmin} component={DevicesComponent} />
<PrivateRoute path="/heatmap" exact authenticated={authenticated} isAdmin={isAdmin} component={HeatmapComponent} />
</Switch>
</BrowserRouter>