diff --git a/src/pages/controlpanel/components/Brukere.tsx b/src/pages/controlpanel/components/Brukere.tsx new file mode 100644 index 00000000..faaf8bc4 --- /dev/null +++ b/src/pages/controlpanel/components/Brukere.tsx @@ -0,0 +1,100 @@ +import React, { useState } from "react"; +import Navbar from "./Navbar"; +import CreateTable from "./CreateTable"; + +const Brukere = (): JSX.Element => { + const select = ["Aktive Brukere", "Inaktive Brukere"]; + const [selected, setSelected] = useState(select[0]); + + interface User { + name: string; + phone: string; + email: string; + study: string; + region: string; + } + + const aktiveBrukereListe: User[] = [ + { + name: "Amalie Skram", + phone: "12345678", + email: "Aaryan.er.kul@hotmail.com", + study: "MTDT", + region: "Trondheim", + }, + { + name: "Filip King", + phone: "12345678", + email: "Filip443@gmail.com", + study: "BIT", + region: "Trondheim", + }, + { + name: "Mauriccio", + phone: "69443293", + email: "mauriccio@hotmail.com", + study: "MTDT", + region: "Madagaskar", + }, + ]; + + const inaktiveBrukereListe: User[] = [ + { + name: "OJ Simpy", + phone: "76543232", + email: "OJ@hotmail.com", + study: "MTDT", + region: "Trondheim", + }, + { + name: "Alfie Queen", + phone: "12345678", + email: "Alfie@gmail.com", + study: "MTDT", + region: "Trondheim", + }, + { + name: "Mauriccio", + phone: "69443293", + email: "mauriccio@hotmail.com", + study: "MTDT", + region: "Madagaskar", + }, + ]; + + return ( +
+
+

Brukere

+
+
+ +
+ +
+ {(selected === select[0] && ( + + )) || + (selected === select[1] && ( + + ))} +
+
+ ); +}; + +export default Brukere; diff --git a/src/pages/controlpanel/routes.tsx b/src/pages/controlpanel/routes.tsx index 69d81604..887284af 100644 --- a/src/pages/controlpanel/routes.tsx +++ b/src/pages/controlpanel/routes.tsx @@ -4,6 +4,7 @@ import { AppRoute } from "App"; import Skoler from "pages/controlpanel/components/Skoler"; import Teaminteresse from "pages/controlpanel/components/Teaminteresse"; import Assistent from "pages/controlpanel/components/Assistent"; +import Brukere from "pages/controlpanel/components/Brukere"; import OpprettTeam from "./components/Team/OpprettTeam"; import RegistrerSoker from "./components/RegistrerSoker/RegistrerSoker"; import Teammedlemmer from "./components/Team/Teammedlemmer"; @@ -14,7 +15,13 @@ const routes: AppRoute[] = [ { path: "", element: , name: "Kontrollpanel" }, { path: "/kontrollpanel/team", element: , name: "Team" }, { path: "/kontrollpanel/skoler", element: , name: "Skoler" }, - { path: "/kontrollpanel/opprett-team", element: , name: "Opprett nytt team" }, + { + path: "/kontrollpanel/opprett-team", + element: , + name: "Opprett nytt team", + }, + { path: "/kontrollpanel/brukere", element: , name: "Brukere" }, + { path: "/kontrollpanel/teams/:id", element: ,