diff --git a/frontend/src/components/TopBar.tsx b/frontend/src/components/TopBar.tsx
index 779e2ad..65f9f0c 100644
--- a/frontend/src/components/TopBar.tsx
+++ b/frontend/src/components/TopBar.tsx
@@ -1,21 +1,17 @@
import { NavLink } from 'react-router-dom'
-const TopBar = () => {
+const TopBar = ({ routes }: { routes: { name: string; path: string }[] }) => {
const linkClass = ({ isActive }: { isActive: boolean }) =>
isActive ? 'underline font-bold' : ''
return (
System PRI
-
- Grupy
-
-
- Studenci
-
-
- Opiekunowie
-
+ {routes.map(({ path, name }) => (
+
+ {name}
+
+ ))}
)
diff --git a/frontend/src/views/coordinator/Coordinator.tsx b/frontend/src/views/coordinator/Coordinator.tsx
index 91bb25e..0ae7e00 100644
--- a/frontend/src/views/coordinator/Coordinator.tsx
+++ b/frontend/src/views/coordinator/Coordinator.tsx
@@ -1,23 +1,29 @@
-import { useEffect } from "react";
-import { Outlet, useNavigate } from "react-router-dom";
-import TopBar from "../../components/TopBar";
+import { useEffect } from 'react'
+import { Outlet, useNavigate } from 'react-router-dom'
+import TopBar from '../../components/TopBar'
const Coordinator = () => {
- const navigate = useNavigate();
+ const navigate = useNavigate()
useEffect(() => {
- navigate("/coordinator/students");
+ navigate('/coordinator/students')
// eslint-disable-next-line react-hooks/exhaustive-deps
- }, []);
+ }, [])
return (
<>
-
+
>
- );
-};
+ )
+}
-export default Coordinator;
+export default Coordinator