forked from Archives/Athou_commafeed
make sure the tree has been reloaded before navigating to the new feed subscription
This commit is contained in:
@@ -39,8 +39,8 @@ export function Subscribe() {
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
const subscribe = useAsyncCallback(client.feed.subscribe, {
|
const subscribe = useAsyncCallback(client.feed.subscribe, {
|
||||||
onSuccess: sub => {
|
onSuccess: async sub => {
|
||||||
dispatch(reloadTree())
|
await dispatch(reloadTree())
|
||||||
dispatch(redirectToFeed(sub.data))
|
dispatch(redirectToFeed(sub.data))
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user