enhance: display contents in the right sidebar if empty

pull/1196/head
Tienson Qin 2021-01-24 17:16:34 +08:00
parent b1b435e3ca
commit 0ac53160e4
1 changed files with 3 additions and 0 deletions

View File

@ -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)