Reorder All of the Tracks!!!
Now that we can add tracks to an album, we can display nicely formatted track lists for each album on the artist’s profile page. Currently, we have a “track data coming soon” placeholder display coming from the track_details function component in TunezWeb.Artists.ShowLive. This is because when the track_details function component is rendered at the bottom of the album_details function component, the provided tracks is a hardcoded empty list.
To put the real track data in there, first, we need to load the tracks when we load album data, up in the handle_params/3 function. We already have :albums as a single item in the list of data to load, so to load tracks for each of the albums, we turn it into a keyword list: ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access