mirror of
https://github.com/penpot/penpot.git
synced 2026-08-07 13:29:07 +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*
|
(mf/defc error-container*
|
||||||
[{:keys [children]}]
|
[{:keys [children]}]
|
||||||
(let [profile-id (:profile-id @st/state)
|
(let [profile (mf/deref refs/profile)
|
||||||
on-nav-root (mf/use-fn #(st/emit! (rt/nav-root)))]
|
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)}
|
[:section {:class (stl/css :exception-layout)}
|
||||||
[:button
|
[:button
|
||||||
{:class (stl/css :exception-header)
|
{:class (stl/css :exception-header)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user