Merge pull request #5527 from penpot/niwinz-bugfix-2

🐛 Fix incorrect navigate event on assets tab click
This commit is contained in:
Eva Marco 2025-01-08 17:55:51 +01:00 committed by GitHub
commit de0eee13af
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -367,14 +367,14 @@
(watch [_ state _] (watch [_ state _]
(let [team-id (or team-id (:current-team-id state)) (let [team-id (or team-id (:current-team-id state))
file-id (or file-id (:current-file-id state)) file-id (or file-id (:current-file-id state))
;: FIXME: why not :current-page-id page-id (or page-id (:current-page-id state)
page-id (or page-id
(dm/get-in state [:workspace-data :pages 0])) (dm/get-in state [:workspace-data :pages 0]))
params (-> (rt/get-params state) params (-> (rt/get-params state)
(assoc :team-id team-id) (assoc :team-id team-id)
(assoc :file-id file-id) (assoc :file-id file-id)
(assoc :page-id page-id) (assoc :page-id page-id)
(assoc :layout layout) (update :layout #(or layout %))
(d/without-nils))] (d/without-nils))]
(rx/of (rt/nav :workspace params options)))))) (rx/of (rt/nav :workspace params options))))))