Skip to content

Commit 9275641

Browse files
committed
fix: improve code
1 parent cd0df9b commit 9275641

File tree

3 files changed

+2
-4
lines changed

3 files changed

+2
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@
310310
"@box/metadata-view": "^1.10.0",
311311
"@box/react-virtualized": "^9.22.3-rc-box.10",
312312
"@box/types": "^0.2.1",
313-
"@box/unified-share-modal": "^1.7.1",
313+
"@box/unified-share-modal": "^1.36.1",
314314
"@box/user-selector": "^1.23.25",
315315
"@hapi/address": "^2.1.4",
316316
"@tanstack/react-virtual": "^3.13.12",

src/elements/content-sharing/SharingNotification.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,6 @@ function SharingNotification({
234234
const sendInvitesFn = useInvites(api, itemID, itemType, {
235235
handleSuccess: response => {
236236
createNotification(TYPE_INFO, contentSharingMessages.sendInvitesSuccess);
237-
setIsLoading(false);
238237
setCollaboratorsList((prevList: collaboratorsListType | null) => {
239238
const newList = prevList ? { ...prevList } : { collaborators: [] };
240239
const newCollab = convertCollab({
@@ -251,7 +250,6 @@ function SharingNotification({
251250
},
252251
handleError: () => {
253252
createNotification(TYPE_ERROR, contentSharingMessages.sendInvitesError);
254-
setIsLoading(false);
255253
closeComponent();
256254
},
257255
setIsLoading,

src/elements/content-sharing/hooks/useInvites.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ function useInvites(api: API, itemID: string, itemType: ItemType, options: UseIn
5050
reject(error);
5151
},
5252
);
53-
});
53+
}).finally(() => setIsLoading(false));
5454
};
5555

5656
const createPostCollaborationFn: SendInvitesFnType =

0 commit comments

Comments
 (0)