Skip to content
Snippets Groups Projects
Commit bad64f24 authored by Alexander Rudolph's avatar Alexander Rudolph
Browse files

create basic Layout (mainly Navbar) for all staff sites

parent 5edc9cfa
No related branches found
No related tags found
No related merge requests found
import { Container, Nav, Navbar } from "react-bootstrap";
import { useTranslation } from "react-i18next";
import {Outlet, useLocation} from "react-router-dom";
function StaffLayout() {
const {t} = useTranslation();
const location = useLocation();
return (
<div>
<Navbar sticky="top" className="bg-secondary" variant="dark" expand="lg">
<Container>
<Navbar.Brand className="fw-bold">{t(`routes.${location.pathname}`)}</Navbar.Brand>
<Navbar.Toggle />
<Navbar.Collapse>
<Nav className="mr-auto" activeKey={location.pathname}>
<Nav.Link href="/staff/overview">{t("staffNav.buttonBoatOverview")}</Nav.Link>
<Nav.Link>{t("staffNav.buttonManageBoats")}</Nav.Link>
<Nav.Link>{t("staffNav.buttonStatistics")}</Nav.Link>
<Nav.Link>{t("staffNav.buttonLogout")}</Nav.Link>
</Nav>
</Navbar.Collapse>
</Container>
</Navbar>
<Outlet />
</div>
);
}
export default StaffLayout;
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment