1
Fork 0
mirror of https://github.com/pds-nest/nest.git synced 2024-11-22 13:04:19 +00:00
pds-2021-g2-nest/nest_frontend/PageSwitcher.js

43 lines
1.3 KiB
JavaScript
Raw Normal View History

2021-05-11 14:37:15 +00:00
import React from "react"
import { Route, Switch } from "react-router"
import PageLogin from "./routes/PageLogin"
import PageRepositories from "./routes/PageRepositories"
import PageAlerts from "./routes/PageAlerts"
import PageSettings from "./routes/PageSettings"
import PageDashboard from "./routes/PageDashboard"
import PageRoot from "./routes/PageRoot"
2021-05-10 13:22:07 +00:00
import PageEdit from "./routes/PageEdit"
2021-05-11 21:27:42 +00:00
import PageUsers from "./routes/PageUsers"
export default function PageSwitcher({ ...props }) {
return (
<Switch {...props}>
2021-05-11 21:27:42 +00:00
<Route path={"/repositories/:id/edit"} exact={true}>
<PageEdit/>
</Route>
<Route path={"/login"} exact={true}>
<PageLogin/>
</Route>
2021-05-11 21:27:42 +00:00
<Route path={"/users"} exact={true}>
<PageUsers/>
2021-05-10 13:22:07 +00:00
</Route>
<Route path={"/repositories"} exact={true}>
<PageRepositories/>
</Route>
<Route path={"/alerts"} exact={true}>
<PageAlerts/>
</Route>
<Route path={"/settings"} exact={true}>
<PageSettings/>
</Route>
<Route path={"/dashboard"} exact={true}>
<PageDashboard/>
</Route>
<Route path={"/"}>
<PageRoot/>
</Route>
</Switch>
)
}