Update usage of AuthorizeRejectButtons in group membership requests
This commit is contained in:
parent
7a06c7f92c
commit
d4e9fddd02
1 changed files with 4 additions and 5 deletions
|
@ -36,13 +36,13 @@ const MembershipRequest: React.FC<IMembershipRequest> = ({ account, onAuthorize,
|
||||||
|
|
||||||
if (!account) return null;
|
if (!account) return null;
|
||||||
|
|
||||||
function handleAuthorize(accountId: string) {
|
function handleAuthorize() {
|
||||||
return onAuthorize(accountId)
|
return onAuthorize(account.id)
|
||||||
.catch(() => toast.error(intl.formatMessage(messages.authorizeFail, { name: account.username })));
|
.catch(() => toast.error(intl.formatMessage(messages.authorizeFail, { name: account.username })));
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleReject(accountId: string) {
|
function handleReject() {
|
||||||
return onReject(accountId)
|
return onReject(account.id)
|
||||||
.catch(() => toast.error(intl.formatMessage(messages.rejectFail, { name: account.username })));
|
.catch(() => toast.error(intl.formatMessage(messages.rejectFail, { name: account.username })));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -53,7 +53,6 @@ const MembershipRequest: React.FC<IMembershipRequest> = ({ account, onAuthorize,
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<AuthorizeRejectButtons
|
<AuthorizeRejectButtons
|
||||||
id={account.id}
|
|
||||||
onAuthorize={handleAuthorize}
|
onAuthorize={handleAuthorize}
|
||||||
onReject={handleReject}
|
onReject={handleReject}
|
||||||
/>
|
/>
|
||||||
|
|
Loading…
Reference in a new issue