Patch for update org membership call, hide edit user on self user page

This commit is contained in:
Tuan Dang
2024-07-18 20:40:12 +07:00
parent 20387cff35
commit 43b14d0091
3 changed files with 123 additions and 110 deletions
@@ -3,7 +3,7 @@ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { createNotification } from "@app/components/notifications";
import { DeleteActionModal, IconButton } from "@app/components/v2";
import { useOrganization,useUser } from "@app/context";
import { useOrganization, useUser } from "@app/context";
import { useDeleteUserFromWorkspace, useGetOrgMembership } from "@app/hooks/api";
import { usePopUp } from "@app/hooks/usePopUp";
@@ -51,7 +51,7 @@ export const UserProjectsSection = ({ membershipId }: Props) => {
<div className="w-full rounded-lg border border-mineshaft-600 bg-mineshaft-900 p-4">
<div className="flex items-center justify-between border-b border-mineshaft-400 pb-4">
<h3 className="text-lg font-semibold text-mineshaft-100">Projects</h3>
{userId !== membership.user.id && (
{userId !== membership.user.id && Boolean(membership.user.publicKey) && (
<IconButton
ariaLabel="copy icon"
variant="plain"