diff --git a/frontend/src/app/main/ui/static.cljs b/frontend/src/app/main/ui/static.cljs index d1055ebf43..02069fc147 100644 --- a/frontend/src/app/main/ui/static.cljs +++ b/frontend/src/app/main/ui/static.cljs @@ -43,8 +43,15 @@ (mf/defc error-container* [{:keys [children]}] - (let [profile-id (:profile-id @st/state) - on-nav-root (mf/use-fn #(st/emit! (rt/nav-root)))] + (let [profile (mf/deref refs/profile) + profile-id (:id profile) + on-nav-root (mf/use-fn + (mf/deps profile-id profile) + (fn [] + (if (and profile-id (some? (:default-team-id profile))) + (st/emit! (dcm/go-to-dashboard-recent + :team-id (:default-team-id profile))) + (st/emit! (rt/nav-root)))))] [:section {:class (stl/css :exception-layout)} [:button {:class (stl/css :exception-header)