diff --git a/frontend/src/Components/UserListAdmin.tsx b/frontend/src/Components/UserListAdmin.tsx
index b86076a..3d2bcae 100644
--- a/frontend/src/Components/UserListAdmin.tsx
+++ b/frontend/src/Components/UserListAdmin.tsx
@@ -1,5 +1,6 @@
-import { Link } from "react-router-dom";
+import { useState } from "react";
import { PublicUser } from "../Types/goTypes";
+import UserInfoModal from "./UserInfoModal";
/**
* The props for the UserProps component
@@ -9,27 +10,52 @@ interface UserProps {
}
/**
- * A list of users for admin manage users page, that links admin to the right user page
- * thanks to the state property
- * @param props - The users to display
+ * A list of users for admin manage users page, that sets an onClick
+ * function for eact user
element, which displays a modul with
+ * user info.
+ * @param props - An array of users users to display
* @returns {JSX.Element} The user list
* @example
- * const users = [{ id: 1, userName: "Random name" }];
+ * const users = [{ id: 1, userName: "ExampleName" }];
* return ;
*/
export function UserListAdmin(props: UserProps): JSX.Element {
+ const [modalVisible, setModalVisible] = useState(false);
+ const [username, setUsername] = useState("");
+
+ const handleClick = (username: string): void => {
+ setUsername(username);
+ setModalVisible(true);
+ };
+
+ const handleClose = (): void => {
+ setUsername("");
+ setModalVisible(false);
+ };
+
return (
-