1
0
Fork 0
mirror of https://github.com/heyarne/airsonic-ui.git synced 2026-05-06 18:33:38 +02:00

Make code a bit nicer to read / more idiomatic in some places

This commit is contained in:
Arne Schlüter 2018-04-22 01:00:40 +02:00
commit 491c172ae7
3 changed files with 26 additions and 32 deletions

View file

@ -38,11 +38,8 @@
(defn album-list [content]
[:div
[:h2 (str "Recently played")]
[:ul
(map-indexed
(fn [idx album]
[:li {:key idx} [album-item album]])
(:album content))]])
[:ul (for [[idx album] (map-indexed vector (:album content))]
[:li {:key idx} [album-item album]])]])
;; single album
@ -53,10 +50,8 @@
(:title song)]])
(defn song-list [songs]
[:ul
(map-indexed
(fn [idx song] [:li {:key idx} [song-item song]])
songs)])
[:ul (for [[idx song] (map-indexed vector songs)]
[:li {:key idx} [song-item song]])])
(defn album-detail [content]
[:div