🐛 Fix libraries dashboard view

This commit is contained in:
Alejandro Alonso 2023-11-29 16:09:03 +01:00 committed by Andrey Antukh
parent 1a831eddc5
commit 18acc7c7c8
2 changed files with 9 additions and 8 deletions

View file

@ -256,13 +256,14 @@
(update :dashboard-files d/merge files)))))) (update :dashboard-files d/merge files))))))
(defn fetch-shared-files (defn fetch-shared-files
[] ([] (fetch-shared-files nil))
(ptk/reify ::fetch-shared-files ([team-id]
ptk/WatchEvent (ptk/reify ::fetch-shared-files
(watch [_ state _] ptk/WatchEvent
(let [team-id (:current-team-id state)] (watch [_ state _]
(->> (rp/cmd! :get-team-shared-files {:team-id team-id}) (let [team-id (or team-id (:current-team-id state))]
(rx/map shared-files-fetched)))))) (->> (rp/cmd! :get-team-shared-files {:team-id team-id})
(rx/map shared-files-fetched)))))))
;; --- EVENT: recent-files ;; --- EVENT: recent-files

View file

@ -46,7 +46,7 @@
(dom/set-html-title (tr "title.dashboard.shared-libraries" tname))))) (dom/set-html-title (tr "title.dashboard.shared-libraries" tname)))))
(mf/with-effect [] (mf/with-effect []
(st/emit! (dd/fetch-shared-files) (st/emit! (dd/fetch-shared-files (:id team))
(dd/clear-selected-files))) (dd/clear-selected-files)))
(if new-css-system (if new-css-system