From bad64f242c92a12c6cc8ae8202a71c4763f6cf1f Mon Sep 17 00:00:00 2001
From: Alexander Rudolph <alexr30@web.de>
Date: Wed, 15 Dec 2021 18:00:27 +0100
Subject: [PATCH] create basic Layout (mainly Navbar) for all staff sites

---
 client/src/components/StaffLayout.tsx | 29 +++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)
 create mode 100644 client/src/components/StaffLayout.tsx

diff --git a/client/src/components/StaffLayout.tsx b/client/src/components/StaffLayout.tsx
new file mode 100644
index 0000000..68f1839
--- /dev/null
+++ b/client/src/components/StaffLayout.tsx
@@ -0,0 +1,29 @@
+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
-- 
GitLab