mirror of
https://github.com/penpot/penpot.git
synced 2025-06-09 12:41:41 +02:00
Merge pull request #5883 from penpot/niwinz-bugfix-3
🐛 Fix incorrect navigation on show-main-component menu option
This commit is contained in:
commit
02f78d80d7
2 changed files with 6 additions and 5 deletions
|
@ -29,7 +29,7 @@
|
||||||
|
|
||||||
(sm/register! ::component schema:component)
|
(sm/register! ::component schema:component)
|
||||||
|
|
||||||
(def check-component!
|
(def check-component
|
||||||
(sm/check-fn schema:component))
|
(sm/check-fn schema:component))
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
|
@ -713,8 +713,10 @@
|
||||||
|
|
||||||
(defn go-to-component-file
|
(defn go-to-component-file
|
||||||
[file-id component]
|
[file-id component]
|
||||||
(dm/assert! (uuid? file-id))
|
|
||||||
(dm/assert! (some? component))
|
(assert (uuid? file-id) "expected an uuid for `file-id`")
|
||||||
|
(assert (ctk/check-component component) "expected a valid component")
|
||||||
|
|
||||||
(ptk/reify ::nav-to-component-file
|
(ptk/reify ::nav-to-component-file
|
||||||
ptk/WatchEvent
|
ptk/WatchEvent
|
||||||
(watch [_ state _]
|
(watch [_ state _]
|
||||||
|
@ -722,8 +724,7 @@
|
||||||
(assoc :file-id file-id)
|
(assoc :file-id file-id)
|
||||||
(assoc :page-id (:main-instance-page component))
|
(assoc :page-id (:main-instance-page component))
|
||||||
(assoc :component-id (:id component)))]
|
(assoc :component-id (:id component)))]
|
||||||
(rx/of (rt/nav :workspace params :new-window? true))))))
|
(rx/of (rt/nav :workspace params ::rt/new-window true))))))
|
||||||
|
|
||||||
|
|
||||||
(defn go-to-local-component
|
(defn go-to-local-component
|
||||||
[& {:keys [id] :as options}]
|
[& {:keys [id] :as options}]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue