diff --git a/app/javascript/mastodon/features/ui/components/confirmation_modals/delete_collection.tsx b/app/javascript/mastodon/features/ui/components/confirmation_modals/delete_collection.tsx index 9da8adaa1b..461f6a8dc8 100644 --- a/app/javascript/mastodon/features/ui/components/confirmation_modals/delete_collection.tsx +++ b/app/javascript/mastodon/features/ui/components/confirmation_modals/delete_collection.tsx @@ -38,8 +38,8 @@ export const ConfirmDeleteCollectionModal: React.FC< const history = useHistory(); const { acct: currentUserName } = useAccount(me) ?? {}; - const onConfirm = useCallback(() => { - void dispatch(deleteCollection({ collectionId: id })); + const onConfirm = useCallback(async () => { + await dispatch(deleteCollection({ collectionId: id })); history.push(`/@${currentUserName}/collections`); }, [dispatch, history, id, currentUserName]);