From 68e08f13a14419ee60e377ab3674e7ff0c787efd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juli=C3=A1n=20David=20S=C3=A1nchez=20Gallego?= <50778235+juliansg022@users.noreply.github.com> Date: Mon, 14 Mar 2022 16:27:38 -0500 Subject: [PATCH] Change plain strings --- apps/web/components/team/MemberListItem.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/apps/web/components/team/MemberListItem.tsx b/apps/web/components/team/MemberListItem.tsx index 401dc9620f..9cb4f524e1 100644 --- a/apps/web/components/team/MemberListItem.tsx +++ b/apps/web/components/team/MemberListItem.tsx @@ -52,7 +52,7 @@ export default function MemberListItem(props: Props) { const ownersInTeam = () => { const { members } = props.team; - const owners = members.filter((member) => member["role"] === "OWNER"); + const owners = members.filter((member) => member["role"] === MembershipRole.OWNER); return owners.length; }; @@ -137,8 +137,10 @@ export default function MemberListItem(props: Props) { {((props.team.membership.role === MembershipRole.OWNER && - (props.member.role !== "OWNER" || (ownersInTeam() > 1 && props.member.id === currentUser))) || - (props.team.membership.role === MembershipRole.ADMIN && props.member.role !== "OWNER")) && ( + (props.member.role !== MembershipRole.OWNER || + (ownersInTeam() > 1 && props.member.id === currentUser))) || + (props.team.membership.role === MembershipRole.ADMIN && + props.member.role !== MembershipRole.OWNER)) && ( <>