Update usage of AuthorizeRejectButtons in group membership requests

This commit is contained in:
Alex Gleason 2023-03-20 19:24:06 -05:00
parent 7a06c7f92c
commit d4e9fddd02
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7

View file

@ -36,13 +36,13 @@ const MembershipRequest: React.FC<IMembershipRequest> = ({ account, onAuthorize,
if (!account) return null;
function handleAuthorize(accountId: string) {
return onAuthorize(accountId)
function handleAuthorize() {
return onAuthorize(account.id)
.catch(() => toast.error(intl.formatMessage(messages.authorizeFail, { name: account.username })));
}
function handleReject(accountId: string) {
return onReject(accountId)
function handleReject() {
return onReject(account.id)
.catch(() => toast.error(intl.formatMessage(messages.rejectFail, { name: account.username })));
}
@ -53,7 +53,6 @@ const MembershipRequest: React.FC<IMembershipRequest> = ({ account, onAuthorize,
</div>
<AuthorizeRejectButtons
id={account.id}
onAuthorize={handleAuthorize}
onReject={handleReject}
/>