mirror of
https://github.com/penpot/penpot.git
synced 2026-05-19 23:13:39 +00:00
🐛 Fix redirect after leaving team
This commit is contained in:
parent
ee6489b202
commit
29ad9aa057
@ -82,7 +82,15 @@
|
||||
(watch [_ state _]
|
||||
(when-let [team-id (or team-id (:current-team-id state))]
|
||||
(->> (rp/cmd! :get-team-members {:team-id team-id})
|
||||
(rx/map (partial members-fetched team-id))))))))
|
||||
(rx/map (partial members-fetched team-id))
|
||||
(rx/catch (fn [cause]
|
||||
(let [{:keys [type]} (ex-data cause)]
|
||||
(if (= :not-found type)
|
||||
(do
|
||||
(log/warn :hint "fetch-members: team not found, skipping"
|
||||
:team-id (str team-id))
|
||||
(rx/empty))
|
||||
(rx/throw cause)))))))))))
|
||||
|
||||
(defn- invitations-fetched
|
||||
[team-id invitations]
|
||||
|
||||
@ -229,7 +229,8 @@
|
||||
(mf/deps profile)
|
||||
(fn []
|
||||
(let [team-id (:default-team-id profile)]
|
||||
(st/emit! (dcm/go-to-dashboard-recent :team-id team-id)))))
|
||||
(st/emit! (rt/assign-exception nil)
|
||||
(dcm/go-to-dashboard-recent :team-id team-id)))))
|
||||
|
||||
on-success
|
||||
(mf/use-fn
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user