Fix stale collections list after deleting a collection (#38852)

This commit is contained in:
diondiondion 2026-04-29 16:42:23 +02:00 committed by GitHub
parent 578836f9ae
commit b761310823
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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]);