[Glitch] Fix stale collections list after deleting a collection

Port b761310823926d7f30e46f401ce17f35027c114e to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
diondiondion 2026-04-29 16:42:23 +02:00 committed by Claire
parent 26cee35f50
commit 675c19a18b

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