[Glitch] Fix stale collections list after deleting a collection
Port b761310823 to glitch-soc
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
1 parent
26cee35f50
commit
675c19a18b
1 file changed
+2
-2
+2
-2
@@ -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]);
|
||||
|
||||
|
||||
Reference in new issue
Block a user