Browse Source

enhance: display contents in the right sidebar if empty

Tienson Qin 4 years ago
parent
commit
0ac53160e4
1 changed files with 3 additions and 0 deletions
  1. 3 0
      src/main/frontend/components/right_sidebar.cljs

+ 3 - 0
src/main/frontend/components/right_sidebar.cljs

@@ -209,6 +209,9 @@
 (rum/defcs sidebar < rum/reactive
   [state]
   (let [blocks (state/sub :sidebar/blocks)
+        blocks (if (empty? blocks)
+                 [[(state/get-current-repo) "contents" :contents nil]]
+                 blocks)
         sidebar-open? (state/sub :ui/sidebar-open?)
         repo (state/sub :git/current-repo)
         match (state/sub :route-match)