2021-04-21 13:08:54 +00:00
|
|
|
import React from "react"
|
|
|
|
import Style from "./Sidebar.module.css"
|
|
|
|
import classNames from "classnames"
|
2021-04-21 13:37:12 +00:00
|
|
|
import Logo from "./Logo"
|
2021-04-21 13:53:23 +00:00
|
|
|
import ButtonSidebar from "./ButtonSidebar"
|
2021-04-22 16:06:50 +00:00
|
|
|
import { faCog, faExclamationTriangle, faFolder, faHome, faWrench } from "@fortawesome/free-solid-svg-icons"
|
2021-04-21 13:08:54 +00:00
|
|
|
|
|
|
|
|
|
|
|
export default function Sidebar({ children, className, ...props }) {
|
|
|
|
return (
|
|
|
|
<div className={classNames(Style.Sidebar, className)} {...props}>
|
2021-04-21 13:16:08 +00:00
|
|
|
{/* TODO: Aggiungere il logo qui! */}
|
2021-04-21 13:37:12 +00:00
|
|
|
<Logo/>
|
2021-04-21 16:00:21 +00:00
|
|
|
<ButtonSidebar to={"/"} icon={faHome}>Dashboard</ButtonSidebar>
|
|
|
|
<ButtonSidebar to={"/repositories"} icon={faFolder}>Repositories</ButtonSidebar>
|
|
|
|
<ButtonSidebar to={"/alerts"} icon={faExclamationTriangle}>Alerts</ButtonSidebar>
|
|
|
|
<ButtonSidebar to={"/settings"} icon={faCog}>Settings</ButtonSidebar>
|
2021-04-22 16:06:50 +00:00
|
|
|
{
|
|
|
|
process.env.NODE_ENV === "development" ?
|
|
|
|
<ButtonSidebar to={"/sandbox"} icon={faWrench}>Sandbox</ButtonSidebar>
|
|
|
|
: null
|
|
|
|
}
|
2021-04-21 13:08:54 +00:00
|
|
|
{children}
|
|
|
|
</div>
|
|
|
|
)
|
|
|
|
}
|