mirror of
https://github.com/billsonnn/nitro-react.git
synced 2024-11-26 15:40:51 +01:00
Merge branch 'dev' into 'dev'
Allow users to leave private groups See merge request nitro/nitro-react!86
This commit is contained in:
commit
22d3ff32a2
@ -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