From 7675e91df891b0f8e488cd856a34361ecb5e5876 Mon Sep 17 00:00:00 2001 From: Rory Doak Date: Fri, 20 Sep 2024 14:56:57 +0100 Subject: [PATCH] feat: add logic to only show remove on team editor table --- .../Team/components/MembersTable.tsx | 25 ++++++++++--------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/editor.planx.uk/src/pages/FlowEditor/components/Team/components/MembersTable.tsx b/editor.planx.uk/src/pages/FlowEditor/components/Team/components/MembersTable.tsx index 2988d38d94..ded8d1ce50 100644 --- a/editor.planx.uk/src/pages/FlowEditor/components/Team/components/MembersTable.tsx +++ b/editor.planx.uk/src/pages/FlowEditor/components/Team/components/MembersTable.tsx @@ -164,18 +164,19 @@ export const MembersTable = ({ - {showEditMemberButton && ( - { - setActionType("remove"); - setShowModal(true); - setInitialValues(member); - }} - data-testId={`remove-button-${i}`} - > - Remove - - )} + {showEditMemberButton && + member.role !== "platformAdmin" && ( + { + setActionType("remove"); + setShowModal(true); + setInitialValues(member); + }} + data-testId={`remove-button-${i}`} + > + Remove + + )}