🐛 Fix incorrect navigate event on assets tab click

This commit is contained in:
Andrey Antukh 2025-01-08 17:44:26 +01:00
parent 8ef4850a06
commit 384f13a9e2

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