mirror of
https://github.com/penpot/penpot.git
synced 2026-06-20 06:12:04 +00:00
🐛 Fix go to your penpot on error page (#10322)
This commit is contained in:
parent
bbf63e1136
commit
038ab5e1f7
@ -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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user