diff --git a/src/stores/authStore.ts b/src/stores/authStore.ts index e3d0813a2a000af71a5cbbbcb18328650208325a..7ace4446d1335e7f87a7d880ed9969b452c4e972 100644 --- a/src/stores/authStore.ts +++ b/src/stores/authStore.ts @@ -56,7 +56,7 @@ export const useAuthStore = create<AuthStore>()( const { isAdmin, projects } = await response.json(); set({ token, username, isAdmin, projects }); - get().setSelectedProject(projects[0]); + await get().setSelectedProject(projects[0]); }, logout: () => set({ token: null, username: '', isAdmin: false, projects: [], selectedProject: null }), }),