Page MenuHomePhabricator

D4315.id13634.diff
No OneTemporary

D4315.id13634.diff

diff --git a/web/settings/relationship/add-users-list.react.js b/web/settings/relationship/add-users-list.react.js
--- a/web/settings/relationship/add-users-list.react.js
+++ b/web/settings/relationship/add-users-list.react.js
@@ -185,22 +185,22 @@
const callUpdateRelationships = useServerCall(updateRelationships);
const dispatchActionPromise = useDispatchActionPromise();
- const confirmSelection = React.useCallback(async () => {
- await dispatchActionPromise(
- updateRelationshipsActionTypes,
- callUpdateRelationships({
- action: relationshipAction,
- userIDs: [...pendingUserIDs],
- }),
- );
+ const updateRelationshipsPromiseCreator = React.useCallback(async () => {
+ const result = await callUpdateRelationships({
+ action: relationshipAction,
+ userIDs: [...pendingUserIDs],
+ });
closeModal();
- }, [
- callUpdateRelationships,
- dispatchActionPromise,
- closeModal,
- pendingUserIDs,
- relationshipAction,
- ]);
+ return result;
+ }, [callUpdateRelationships, closeModal, pendingUserIDs, relationshipAction]);
+ const confirmSelection = React.useCallback(
+ () =>
+ dispatchActionPromise(
+ updateRelationshipsActionTypes,
+ updateRelationshipsPromiseCreator(),
+ ),
+ [dispatchActionPromise, updateRelationshipsPromiseCreator],
+ );
const loadingStatus = useSelector(loadingStatusSelector);
return (

File Metadata

Mime Type
text/plain
Expires
Fri, Dec 20, 1:02 PM (14 h, 51 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2681798
Default Alt Text
D4315.id13634.diff (1 KB)

Event Timeline