mirror of
https://github.com/penpot/penpot.git
synced 2025-04-17 17:24:32 -05:00
🐛 Fix libraries dashboard view
This commit is contained in:
parent
1a831eddc5
commit
18acc7c7c8
2 changed files with 9 additions and 8 deletions
|
@ -256,13 +256,14 @@
|
|||
(update :dashboard-files d/merge files))))))
|
||||
|
||||
(defn fetch-shared-files
|
||||
[]
|
||||
(ptk/reify ::fetch-shared-files
|
||||
ptk/WatchEvent
|
||||
(watch [_ state _]
|
||||
(let [team-id (:current-team-id state)]
|
||||
(->> (rp/cmd! :get-team-shared-files {:team-id team-id})
|
||||
(rx/map shared-files-fetched))))))
|
||||
([] (fetch-shared-files nil))
|
||||
([team-id]
|
||||
(ptk/reify ::fetch-shared-files
|
||||
ptk/WatchEvent
|
||||
(watch [_ state _]
|
||||
(let [team-id (or team-id (:current-team-id state))]
|
||||
(->> (rp/cmd! :get-team-shared-files {:team-id team-id})
|
||||
(rx/map shared-files-fetched)))))))
|
||||
|
||||
;; --- EVENT: recent-files
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
(dom/set-html-title (tr "title.dashboard.shared-libraries" tname)))))
|
||||
|
||||
(mf/with-effect []
|
||||
(st/emit! (dd/fetch-shared-files)
|
||||
(st/emit! (dd/fetch-shared-files (:id team))
|
||||
(dd/clear-selected-files)))
|
||||
|
||||
(if new-css-system
|
||||
|
|
Loading…
Add table
Reference in a new issue