August 2025
Intermediate to advanced
294 pages
6h 59m
English
On the profile page for an Artist in TunezWeb.Artists.ShowLive, we want to show a list of albums released by that artist. It’s currently populated with placeholder data:

And this data is defined in the handle_params/3 callback:
| | def handle_params(%{"id" => artist_id}, _url, socket) do |
| | artist = Tunez.Music.get_artist_by_id!(artist_id) |
| | |
| | albums = [ |
| | %{ |
| | id: "test-album-1", |
| | name: "Test Album", |
| | year_released: 2023, |
| | cover_image_url: nil |
| | } |
| | ] |
| | |
| | socket = |
| | socket |
| | |> assign(:artist, artist) |
| | |> assign(:albums, albums) |
| | |> assign( ... |
Read now
Unlock full access