Implement nicer loading indicator
This commit is contained in:
parent
a7267a241d
commit
80d0a6e258
2 changed files with 33 additions and 1 deletions
|
|
@ -390,10 +390,11 @@
|
|||
(str ", displaying " (count displayed-posts) (when query " matches"))))]
|
||||
[:section.search-form
|
||||
[search]
|
||||
(when (seq loading) " …")
|
||||
[loading-indicator (select-keys posts [:loading])]
|
||||
#_(cond (= api-state :loading) " …"
|
||||
(= api-state :error) " API Error!")]
|
||||
[:section.buttons
|
||||
[:button.control-button {:on-click fetch-more-posts!} "⇓ Fetch more"]
|
||||
[:button.control-button {:on-click disconnect-account!} "▤ Disconnect account"]]]
|
||||
[:ul.results (map-indexed (fn [idx p]
|
||||
^{:key idx} [:li.result [post {:post p}]]) displayed-posts)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue