Implement nicer loading indicator

This commit is contained in:
arne 2025-11-19 13:23:00 +01:00
commit 80d0a6e258
2 changed files with 33 additions and 1 deletions

View file

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