🐛 Fix go to your penpot on error page (#10322)

This commit is contained in:
Pablo Alba 2026-06-19 01:06:36 +02:00 committed by GitHub
parent bbf63e1136
commit 038ab5e1f7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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)