"No data" text for empty repo groups

* show "No data" text for repository groups with no repositories
This commit is contained in:
Teemu Patja 2017-04-03 18:16:40 +03:00
parent a7f636c956
commit 034dacf29a
No known key found for this signature in database
GPG Key ID: F5B7035E6580FD4C
1 changed files with 6 additions and 3 deletions

View File

@ -68,9 +68,12 @@
(map (fn [group] [group (get @repos group)])
repo-groups)]
[:div.repo-group-title [repo-group-title group (:login @user)]
(into [:div.ui.cards]
(map repo-card
(filter filter-fn group-repos)))]))))))
(let [filtered-group-repos (filter filter-fn group-repos)]
(if (empty? filtered-group-repos)
[:div.ui.text "No data"]
(into [:div.ui.cards]
(map repo-card
filtered-group-repos))))]))))))
(defn repos-page-token-ok []
(println "repos-token-ok")