Skip to content

Commit

Permalink
feat: add logic to only show remove on team editor table
Browse files Browse the repository at this point in the history
  • Loading branch information
RODO94 committed Sep 30, 2024
1 parent e483c88 commit 7675e91
Showing 1 changed file with 13 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -164,18 +164,19 @@ export const MembersTable = ({
</Permission.IsPlatformAdmin>
<Permission.IsPlatformAdmin>
<TableCell>
{showEditMemberButton && (
<RemoveUserButton
onClick={() => {
setActionType("remove");
setShowModal(true);
setInitialValues(member);
}}
data-testId={`remove-button-${i}`}
>
Remove
</RemoveUserButton>
)}
{showEditMemberButton &&
member.role !== "platformAdmin" && (
<RemoveUserButton
onClick={() => {
setActionType("remove");
setShowModal(true);
setInitialValues(member);
}}
data-testId={`remove-button-${i}`}
>
Remove
</RemoveUserButton>
)}
</TableCell>
</Permission.IsPlatformAdmin>
</StyledTableRow>
Expand Down

0 comments on commit 7675e91

Please sign in to comment.