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; 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}
/> />