Browse Source

enhance: refresh remote graphs when visiting All Graphs page

Tienson Qin 3 months ago
parent
commit
752601bdc7
1 changed files with 5 additions and 0 deletions
  1. 5 0
      src/main/frontend/components/repo.cljs

+ 5 - 0
src/main/frontend/components/repo.cljs

@@ -180,6 +180,11 @@
               "Delete from server")))))]]]))
 
 (rum/defc repos-cp < rum/reactive
+  {:will-mount (fn [state]
+                 (let [login? (:auth/id-token @state/state)]
+                   (when (and login? (user-handler/rtc-group?))
+                     (rtc-handler/<get-remote-graphs)))
+                 state)}
   []
   (let [login? (boolean (state/sub :auth/id-token))
         repos (state/sub [:me :repos])