From 13ad57da10f193e634c9abfd82da2ba6febafe61 Mon Sep 17 00:00:00 2001 From: Athou Date: Fri, 14 Feb 2025 13:17:59 +0100 Subject: [PATCH] make sure the tree has been reloaded before navigating to the new feed subscription --- commafeed-client/src/components/content/add/Subscribe.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commafeed-client/src/components/content/add/Subscribe.tsx b/commafeed-client/src/components/content/add/Subscribe.tsx index 0c854b0a..ab1f6d24 100644 --- a/commafeed-client/src/components/content/add/Subscribe.tsx +++ b/commafeed-client/src/components/content/add/Subscribe.tsx @@ -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)) }, })