make sure the tree has been reloaded before navigating to the new feed subscription

This commit is contained in:
Athou
2025-02-14 13:17:59 +01:00
parent 44bc24c22a
commit 13ad57da10

View File

@@ -39,8 +39,8 @@ export function Subscribe() {
},
})
const subscribe = useAsyncCallback(client.feed.subscribe, {
onSuccess: sub => {
dispatch(reloadTree())
onSuccess: async sub => {
await dispatch(reloadTree())
dispatch(redirectToFeed(sub.data))
},
})