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:
parent
19aa7038b3
commit
491c172ae7
3 changed files with 26 additions and 32 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue