🐛 Fix race conditions on profile and teams loading.

This commit is contained in:
Andrey Antukh 2021-04-13 11:57:52 +02:00
parent 464a686c04
commit 99bcf0484a
8 changed files with 51 additions and 49 deletions

View file

@ -47,10 +47,10 @@
(watch [this state stream]
(let [team-id (current-team-id profile)
props (:props profile)]
(rx/merge
(rx/of (du/profile-fetched profile)
(rt/nav' :dashboard-projects {:team-id team-id}))
(rx/concat
(rx/of (du/profile-fetched profile))
(rx/of (du/fetch-teams))
(rx/of (rt/nav' :dashboard-projects {:team-id team-id}))
(when-not (:onboarding-viewed props)
(->> (rx/of (modal/show {:type :onboarding}))
(rx/delay 1000))))))))