From 642c5ccd95397facd6043c85e5c13772e0a5336e Mon Sep 17 00:00:00 2001 From: Wan Qi Chen <495709+wa0x6e@users.noreply.github.com> Date: Wed, 29 May 2024 00:49:06 +0400 Subject: [PATCH] fix: load sidebar spaces once all are available --- apps/ui/src/stores/followedSpaces.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/ui/src/stores/followedSpaces.ts b/apps/ui/src/stores/followedSpaces.ts index b3096d674..a135aae5a 100644 --- a/apps/ui/src/stores/followedSpaces.ts +++ b/apps/ui/src/stores/followedSpaces.ts @@ -82,7 +82,7 @@ export const useFollowedSpacesStore = defineStore('followedSpaces', () => { ) ) ); - fetchSpacesData(newIds); + await fetchSpacesData(newIds); } async function toggleSpaceFollow(id: string) { @@ -124,6 +124,8 @@ export const useFollowedSpacesStore = defineStore('followedSpaces', () => { async ([web3, authLoading, authInitiated]) => { if (!authInitiated || authLoading) return; + followedSpacesLoaded.value = false; + if (!web3) { followedSpacesIds.value = []; followedSpacesLoaded.value = true;