diff --git a/frontend/src/app/main/data/dashboard.cljs b/frontend/src/app/main/data/dashboard.cljs index 0e39ddff98..fbe417428a 100644 --- a/frontend/src/app/main/data/dashboard.cljs +++ b/frontend/src/app/main/data/dashboard.cljs @@ -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 diff --git a/frontend/src/app/main/ui/dashboard/libraries.cljs b/frontend/src/app/main/ui/dashboard/libraries.cljs index b065e19c5c..a08cec20fc 100644 --- a/frontend/src/app/main/ui/dashboard/libraries.cljs +++ b/frontend/src/app/main/ui/dashboard/libraries.cljs @@ -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