From 038ab5e1f732e84b7894f9259eb60bc4df2ffd5f Mon Sep 17 00:00:00 2001 From: Pablo Alba Date: Fri, 19 Jun 2026 01:06:36 +0200 Subject: [PATCH] :bug: Fix go to your penpot on error page (#10322) --- frontend/src/app/main/ui/static.cljs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) 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)