[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:
parent
26cee35f50
commit
675c19a18b
@ -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]);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user