mirror of
https://github.com/billsonnn/nitro-react.git
synced 2024-11-22 22:30:52 +01:00
Allow users to leave private groups
This commit is contained in:
parent
71e8d8a3a1
commit
b08b49be7a
@ -47,7 +47,7 @@ export const GroupInformationView: FC<GroupInformationViewProps> = 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<GroupInformationViewProps> = props =>
|
||||
<Text small underline pointer onClick={ () => handleAction('furniture') }>{ LocalizeText('group.buyfurni') }</Text>
|
||||
<Text small underline pointer onClick={ () => handleAction('popular_groups') }>{ LocalizeText('group.showgroups') }</Text>
|
||||
</Column>
|
||||
{ (groupInformation.type !== GroupType.PRIVATE) &&
|
||||
{ (groupInformation.type !== GroupType.PRIVATE || groupInformation.type === GroupType.PRIVATE && groupInformation.membershipType === GroupMembershipType.MEMBER) &&
|
||||
<Button disabled={ (groupInformation.membershipType === GroupMembershipType.REQUEST_PENDING) || isRealOwner } onClick={ handleButtonClick }>
|
||||
{ LocalizeText(getButtonText()) }
|
||||
</Button> }
|
||||
|
Loading…
Reference in New Issue
Block a user