Skip to content

Commit dba2f08

Browse files
committed
refactor(invites): nicier fn name
1 parent c4edb04 commit dba2f08

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

jsapp/js/account/organization/invites/OrgInviteModal.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export default function OrgInviteModal(props: { orgId: string; inviteId: string;
4242
notifyAboutError: false,
4343
}
4444
})
45-
const orgInvitesPatchMutateAsync = (status: MemberInviteStatus) => {
45+
const handleOrgInvitesPatch = (status: MemberInviteStatus) => {
4646
return orgInvitesPatch.mutateAsync({ organizationId: props.orgId, guid: props.inviteId, data: { status } })
4747
}
4848
// We handle all the errors through query and BE responses, but for some edge cases we have this:
@@ -72,7 +72,7 @@ export default function OrgInviteModal(props: { orgId: string; inviteId: string;
7272
const handleDeclineInvite = async () => {
7373
try {
7474
setUserResponseType(MemberInviteStatus.declined)
75-
await orgInvitesPatchMutateAsync(MemberInviteStatus.declined)
75+
await handleOrgInvitesPatch(MemberInviteStatus.declined)
7676
handleSuccessfulInviteResponse(t('Invitation successfully declined'))
7777
} catch (error) {
7878
setMiscError(t('Unknown error while trying to update an invitation'))
@@ -83,7 +83,7 @@ export default function OrgInviteModal(props: { orgId: string; inviteId: string;
8383
const handleAcceptInvite = async () => {
8484
try {
8585
setUserResponseType(MemberInviteStatus.accepted)
86-
await orgInvitesPatchMutateAsync(MemberInviteStatus.accepted)
86+
await handleOrgInvitesPatch(MemberInviteStatus.accepted)
8787
await handleSuccessfulInviteResponse(t('Invitation successfully accepted'), true)
8888
} catch (error) {
8989
setMiscError(t('Unknown error while trying to update an invitation'))

0 commit comments

Comments
 (0)