Change plain strings

pull/2657/head^2
Julián David Sánchez Gallego 2022-03-14 16:27:38 -05:00 committed by Omar López
parent 3234898892
commit 68e08f13a1
1 changed files with 5 additions and 3 deletions

View File

@ -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) {
</DropdownMenuItem>
<DropdownMenuSeparator className="h-px bg-gray-200" />
{((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)) && (
<>
<DropdownMenuItem>
<Button