Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3488476
D4315.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D4315.diff
View Options
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
@@ -187,22 +187,22 @@
const callUpdateRelationships = useServerCall(updateRelationships);
const dispatchActionPromise = useDispatchActionPromise();
- const confirmSelection = React.useCallback(async () => {
- await dispatchActionPromise(
- updateRelationshipsActionTypes,
- callUpdateRelationships({
- action: relationshipAction,
- userIDs: Array.from(pendingUserIDs),
- }),
- );
+ const updateRelationshipsPromiseCreator = React.useCallback(async () => {
+ const result = await callUpdateRelationships({
+ action: relationshipAction,
+ userIDs: Array.from(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);
let buttonContent = confirmButtonContent;
if (loadingStatus === 'loading') {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Dec 19, 10:04 AM (21 h, 17 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2676705
Default Alt Text
D4315.diff (1 KB)
Attached To
Mode
D4315: [web] Handle relationship update errors
Attached
Detach File
Event Timeline
Log In to Comment