From 8cd20a06d34af1b9a3be45885a0421ab09d0e45f Mon Sep 17 00:00:00 2001 From: Claudio Ortolina Date: Sun, 21 Sep 2025 17:06:39 +0300 Subject: [PATCH] Fix display of artist images in universal search --- lib/music_library_web/components/artist_components.ex | 2 +- lib/music_library_web/components/search_components.ex | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/music_library_web/components/artist_components.ex b/lib/music_library_web/components/artist_components.ex index 531dc5ce..00838bab 100644 --- a/lib/music_library_web/components/artist_components.ex +++ b/lib/music_library_web/components/artist_components.ex @@ -5,7 +5,7 @@ defmodule MusicLibraryWeb.ArtistComponents do attr :artist, :map, required: true attr :image_hash, :string, required: true - attr :class, :string, required: false + attr :class, :string, required: false, default: nil attr :width, :integer, default: nil def artist_image(assigns) do diff --git a/lib/music_library_web/components/search_components.ex b/lib/music_library_web/components/search_components.ex index 98d6379d..3d508d32 100644 --- a/lib/music_library_web/components/search_components.ex +++ b/lib/music_library_web/components/search_components.ex @@ -78,7 +78,12 @@ defmodule MusicLibraryWeb.SearchComponents do >
- <.artist_image artist={@artist} width={96} image_hash={@image_data_hash} /> + <.artist_image + class="w-12 h-12 rounded-md aspect-square object-cover" + artist={@artist} + width={96} + image_hash={@image_data_hash} + />