From b08b49be7acfbb689f1520740d691c59d32a98b8 Mon Sep 17 00:00:00 2001 From: Sledmore Date: Thu, 22 Sep 2022 20:02:33 +0000 Subject: [PATCH] Allow users to leave private groups --- src/components/groups/views/GroupInformationView.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/groups/views/GroupInformationView.tsx b/src/components/groups/views/GroupInformationView.tsx index 3916a29d..da6bdc83 100644 --- a/src/components/groups/views/GroupInformationView.tsx +++ b/src/components/groups/views/GroupInformationView.tsx @@ -47,7 +47,7 @@ export const GroupInformationView: FC = props => { if(isRealOwner) return 'group.youareowner'; - if(groupInformation.type === GroupType.PRIVATE) return ''; + if(groupInformation.type === GroupType.PRIVATE && groupInformation.membershipType !== GroupMembershipType.MEMBER) return ''; if(groupInformation.membershipType === GroupMembershipType.MEMBER) return 'group.leave'; @@ -135,7 +135,7 @@ export const GroupInformationView: FC = props => handleAction('furniture') }>{ LocalizeText('group.buyfurni') } handleAction('popular_groups') }>{ LocalizeText('group.showgroups') } - { (groupInformation.type !== GroupType.PRIVATE) && + { (groupInformation.type !== GroupType.PRIVATE || groupInformation.type === GroupType.PRIVATE && groupInformation.membershipType === GroupMembershipType.MEMBER) && }