2021-04-21 13:08:54 +00:00
|
|
|
import Layout from "./components/Layout"
|
2021-04-21 16:00:21 +00:00
|
|
|
import { BrowserRouter } from "react-router-dom"
|
2021-04-21 16:21:30 +00:00
|
|
|
import { Route, Switch } from "react-router"
|
2021-04-25 15:22:52 +00:00
|
|
|
import PageDashboard from "./routes/PageDashboard"
|
2021-04-21 16:21:30 +00:00
|
|
|
import PageRepositories from "./routes/PageRepositories"
|
|
|
|
import PageAlerts from "./routes/PageAlerts"
|
|
|
|
import PageSettings from "./routes/PageSettings"
|
2021-04-22 16:06:50 +00:00
|
|
|
import PageSandbox from "./routes/PageSandbox"
|
2021-04-25 15:22:52 +00:00
|
|
|
import PageLogin from "./routes/PageLogin"
|
|
|
|
import PageRoot from "./routes/PageRoot"
|
2021-04-26 16:36:41 +00:00
|
|
|
import GlobalTheme from "./components/GlobalTheme"
|
|
|
|
import GlobalServer from "./components/GlobalServer"
|
|
|
|
import GlobalUser from "./components/GlobalUser"
|
2021-04-20 22:09:13 +00:00
|
|
|
|
2021-04-20 22:07:39 +00:00
|
|
|
|
2021-04-23 00:18:06 +00:00
|
|
|
/**
|
|
|
|
* The main component of the webapp, the root of the render tree, what is displayed when the web page is visited.
|
|
|
|
*
|
|
|
|
* @returns {JSX.Element}
|
|
|
|
* @constructor
|
|
|
|
*/
|
2021-04-20 22:23:35 +00:00
|
|
|
export default function App() {
|
2021-04-20 22:09:13 +00:00
|
|
|
return (
|
2021-04-26 16:36:41 +00:00
|
|
|
<GlobalServer>
|
|
|
|
<GlobalUser>
|
|
|
|
<GlobalTheme>
|
|
|
|
<BrowserRouter>
|
2021-04-21 16:00:21 +00:00
|
|
|
|
2021-04-26 16:36:41 +00:00
|
|
|
<Layout>
|
|
|
|
<Switch>
|
|
|
|
<Route path={"/login"} exact={true}>
|
|
|
|
<PageLogin/>
|
|
|
|
</Route>
|
|
|
|
<Route path={"/repositories"} exact={true}>
|
|
|
|
<PageRepositories/>
|
|
|
|
</Route>
|
|
|
|
<Route path={"/alerts"} exact={true}>
|
|
|
|
<PageAlerts/>
|
|
|
|
</Route>
|
|
|
|
<Route path={"/settings"} exact={true}>
|
|
|
|
<PageSettings/>
|
|
|
|
</Route>
|
|
|
|
<Route path={"/sandbox"} exact={true}>
|
|
|
|
<PageSandbox/>
|
|
|
|
</Route>
|
|
|
|
<Route path={"/dashboard"} exact={true}>
|
|
|
|
<PageDashboard/>
|
|
|
|
</Route>
|
|
|
|
<Route path={"/"}>
|
|
|
|
<PageRoot/>
|
|
|
|
</Route>
|
|
|
|
</Switch>
|
|
|
|
</Layout>
|
2021-04-21 16:00:21 +00:00
|
|
|
|
2021-04-26 16:36:41 +00:00
|
|
|
</BrowserRouter>
|
|
|
|
</GlobalTheme>
|
|
|
|
</GlobalUser>
|
|
|
|
</GlobalServer>
|
2021-04-20 22:09:13 +00:00
|
|
|
)
|
2021-04-20 22:07:39 +00:00
|
|
|
}
|