mirror of
https://github.com/pds-nest/nest.git
synced 2025-02-16 12:43:58 +00:00
✨ Add PageSandbox to test various stuff
This commit is contained in:
parent
f68bbb3d68
commit
e1e38a4635
5 changed files with 36 additions and 5 deletions
|
@ -9,6 +9,7 @@ import PageHome from "./routes/PageHome"
|
|||
import PageRepositories from "./routes/PageRepositories"
|
||||
import PageAlerts from "./routes/PageAlerts"
|
||||
import PageSettings from "./routes/PageSettings"
|
||||
import PageSandbox from "./routes/PageSandbox"
|
||||
|
||||
|
||||
export default function App() {
|
||||
|
@ -61,16 +62,19 @@ export default function App() {
|
|||
<div className={classNames(Style.App, theme)}>
|
||||
<Layout>
|
||||
<Switch>
|
||||
<Route path={"/repositories"}>
|
||||
<Route path={"/repositories"} exact={true}>
|
||||
<PageRepositories/>
|
||||
</Route>
|
||||
<Route path={"/alerts"}>
|
||||
<Route path={"/alerts"} exact={true}>
|
||||
<PageAlerts/>
|
||||
</Route>
|
||||
<Route path={"/settings"}>
|
||||
<Route path={"/settings"} exact={true}>
|
||||
<PageSettings/>
|
||||
</Route>
|
||||
<Route path={"/"}>
|
||||
<Route path={"/sandbox"} exact={true}>
|
||||
<PageSandbox/>
|
||||
</Route>
|
||||
<Route path={"/"} exact={true}>
|
||||
<PageHome/>
|
||||
</Route>
|
||||
</Switch>
|
||||
|
|
|
@ -3,7 +3,7 @@ import Style from "./Sidebar.module.css"
|
|||
import classNames from "classnames"
|
||||
import Logo from "./Logo"
|
||||
import ButtonSidebar from "./ButtonSidebar"
|
||||
import { faCog, faExclamationTriangle, faFolder, faHome } from "@fortawesome/free-solid-svg-icons"
|
||||
import { faCog, faExclamationTriangle, faFolder, faHome, faWrench } from "@fortawesome/free-solid-svg-icons"
|
||||
|
||||
|
||||
export default function Sidebar({ children, className, ...props }) {
|
||||
|
@ -15,6 +15,11 @@ export default function Sidebar({ children, className, ...props }) {
|
|||
<ButtonSidebar to={"/repositories"} icon={faFolder}>Repositories</ButtonSidebar>
|
||||
<ButtonSidebar to={"/alerts"} icon={faExclamationTriangle}>Alerts</ButtonSidebar>
|
||||
<ButtonSidebar to={"/settings"} icon={faCog}>Settings</ButtonSidebar>
|
||||
{
|
||||
process.env.NODE_ENV === "development" ?
|
||||
<ButtonSidebar to={"/sandbox"} icon={faWrench}>Sandbox</ButtonSidebar>
|
||||
: null
|
||||
}
|
||||
{children}
|
||||
</div>
|
||||
)
|
||||
|
|
1
code/frontend/src/routes/.gitignore
vendored
Normal file
1
code/frontend/src/routes/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
PageSandbox.*
|
12
code/frontend/src/routes/PageSandbox.js
Normal file
12
code/frontend/src/routes/PageSandbox.js
Normal file
|
@ -0,0 +1,12 @@
|
|||
import React from "react"
|
||||
import Style from "./PageSandbox.module.css"
|
||||
import classNames from "classnames"
|
||||
|
||||
|
||||
export default function PageSandbox({ children, className, ...props }) {
|
||||
return (
|
||||
<div className={classNames(Style.PageSandbox, className)} {...props}>
|
||||
{children}
|
||||
</div>
|
||||
)
|
||||
}
|
9
code/frontend/src/routes/PageSandbox.module.css
Normal file
9
code/frontend/src/routes/PageSandbox.module.css
Normal file
|
@ -0,0 +1,9 @@
|
|||
.PageSandbox {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
grid-gap: 10px;
|
||||
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
Loading…
Add table
Reference in a new issue