Show ManageMember component
This commit is contained in:
@@ -7,6 +7,7 @@ import SettingsModal from "./components/SettingsModal/SettingsModal";
|
||||
import { useParams } from "react-router";
|
||||
import { useNavigate } from "react-router";
|
||||
import getUserById from "../../utils/users/getUserById.js";
|
||||
import ManageMember from "./components/manageMember/ManageMember.jsx";
|
||||
|
||||
|
||||
interface TaskType {
|
||||
@@ -25,6 +26,7 @@ interface User {
|
||||
email: string;
|
||||
phone: string | null;
|
||||
created_at: string;
|
||||
isAdmin: boolean;
|
||||
tasks: TaskType[];
|
||||
}
|
||||
|
||||
@@ -83,6 +85,9 @@ function ProfilePage() {
|
||||
<h2>
|
||||
{profileUser?.name} {profileUser?.lastname}
|
||||
</h2>
|
||||
{(user?.isAdmin && profileUser && !isOwnProfile) && (
|
||||
<ManageMember userToManage={profileUser} />
|
||||
)}
|
||||
</div>
|
||||
|
||||
<div className={styles.topDescription}>
|
||||
|
||||
Reference in New Issue
Block a user