From 093a58b9ec855e30bd51698d3901f9c0c443704a Mon Sep 17 00:00:00 2001 From: Pablo Alba Date: Thu, 28 Nov 2024 12:50:30 +0100 Subject: [PATCH] :bug: Fix bad redirect after being removed from a team --- frontend/src/app/main/data/common.cljs | 5 +++++ frontend/src/app/main/data/dashboard.cljs | 1 + 2 files changed, 6 insertions(+) diff --git a/frontend/src/app/main/data/common.cljs b/frontend/src/app/main/data/common.cljs index ac83b6bea..35c582c6a 100644 --- a/frontend/src/app/main/data/common.cljs +++ b/frontend/src/app/main/data/common.cljs @@ -224,6 +224,11 @@ [{:keys [team-id team-name change]}] (dm/assert! (uuid? team-id)) (ptk/reify ::team-membership-change + ptk/UpdateEvent + (update [_ state] + ;; FIXME: Remove on 2.5 + (assoc state :current-team-id (dm/get-in state [:profile :default-team-id]))) + ptk/WatchEvent (watch [_ state _] (when (= :removed change) diff --git a/frontend/src/app/main/data/dashboard.cljs b/frontend/src/app/main/data/dashboard.cljs index 404fb8bf0..e66187bea 100644 --- a/frontend/src/app/main/data/dashboard.cljs +++ b/frontend/src/app/main/data/dashboard.cljs @@ -1122,6 +1122,7 @@ (ptk/reify ::go-to-projects-1 ptk/UpdateEvent (update [_ state] + ;; FIXME: Remove on 2.5 (assoc state :current-team-id team-id)) ptk/WatchEvent (watch [_ _ _]