🎉 Remember last team visited

This commit is contained in:
Andrés Moya 2021-03-23 13:11:47 +01:00 committed by Andrey Antukh
parent 013fc2fc9c
commit ec217d8201
8 changed files with 30 additions and 14 deletions

View file

@ -12,7 +12,7 @@
[app.common.spec :as us]
[app.common.uuid :as uuid]
[app.config :as cfg]
[app.main.data.auth :refer [logout]]
[app.main.data.auth :as da]
[app.main.data.messages :as dm]
[app.main.data.users :as udu]
[app.main.repo :as rp]
@ -65,7 +65,7 @@
(->> (rp/query! :profile)
(rx/subs (fn [profile]
(if (not= uuid/zero profile)
(st/emit! (rt/nav :dashboard-projects {:team-id (:default-team-id profile)}))
(st/emit! (rt/nav :dashboard-projects {:team-id (da/current-team-id profile)}))
(st/emit! (rt/nav :auth-login))))))
(and (not authed?) (nil? match))