fix: disable resend button when member is pending removal

pull/3281/head
Audric Ackermann 10 months ago
parent c90b84ca92
commit 1bf1c5e47a
No known key found for this signature in database

@ -247,13 +247,19 @@ const ResendButton = ({ groupPk, pubkey }: { pubkey: PubkeyType; groupPk: GroupP
if (!shouldShowResendButton) {
return null;
}
const resendButtonDisabled =
memberStatus === 'INVITE_SENDING' ||
memberStatus === 'PROMOTION_SENDING' ||
memberStatus === 'REMOVED_MEMBER' ||
memberStatus === 'REMOVED_MEMBER_AND_MESSAGES' ||
memberStatus === 'REMOVED_UNKNOWN';
return (
<SessionButton
dataTestId={'resend-invite-button'}
buttonShape={SessionButtonShape.Square}
buttonType={SessionButtonType.Solid}
text={window.i18n('resend')}
disabled={memberStatus === 'INVITE_SENDING' || memberStatus === 'PROMOTION_SENDING'}
disabled={resendButtonDisabled}
onClick={async () => {
const group = await UserGroupsWrapperActions.getGroup(groupPk);
const member = await MetaGroupWrapperActions.memberGet(groupPk, pubkey);

Loading…
Cancel
Save