From cc039d27ae1d8ce465337bae9af4220dc9be688d Mon Sep 17 00:00:00 2001 From: Peter KW Date: Mon, 1 Apr 2024 02:16:23 +0200 Subject: [PATCH] New modal for member info --- frontend/src/Components/MemberInfoModal.tsx | 77 +++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 frontend/src/Components/MemberInfoModal.tsx diff --git a/frontend/src/Components/MemberInfoModal.tsx b/frontend/src/Components/MemberInfoModal.tsx new file mode 100644 index 0000000..e68f52a --- /dev/null +++ b/frontend/src/Components/MemberInfoModal.tsx @@ -0,0 +1,77 @@ +import Button from "./Button"; +import DeleteUser from "./DeleteUser"; +import UserProjectListAdmin from "./UserProjectListAdmin"; +import { useState } from "react"; +import ChangeRoleView from "./ChangeRoleView"; + +function MemberInfoModal(props: { + isVisible: boolean; + username: string; + onClose: () => void; +}): JSX.Element { + const [showRoles, setShowRoles] = useState(false); + if (!props.isVisible) return <>; + + const handleChangeRole = (): void => { + if (showRoles) { + setShowRoles(false); + } else { + setShowRoles(true); + } + }; + return ( +
+
+

{props.username}

+

+ (Change Role) +

+ {showRoles && ( + + )} +
+

+ Member of these projects: +

+
+ +
+
+
+
+
+
+ ); +} + +export default MemberInfoModal;