From d48ab34af829162ac7a13cbcdda1cbcb6aff5ccf Mon Sep 17 00:00:00 2001 From: Claudio Ortolina Date: Wed, 12 Nov 2025 11:26:04 +0000 Subject: [PATCH] Account for bio not being present or empty --- .../live/artist_live/show.html.heex | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/lib/music_library_web/live/artist_live/show.html.heex b/lib/music_library_web/live/artist_live/show.html.heex index 3f2cfcfa..43206b9d 100644 --- a/lib/music_library_web/live/artist_live/show.html.heex +++ b/lib/music_library_web/live/artist_live/show.html.heex @@ -153,10 +153,16 @@ {gettext("Error loading biography")} -
+
{gettext("Biography")}
-
+
{remove_read_more_link(lastfm_artist_info.summary)} <.link class="block mt-2 text-sm font-medium text-zinc-900 dark:text-zinc-400" @@ -171,7 +177,12 @@ {gettext("Read more")}
- <.sheet id="bio" class="max-w-2xl text-zinc-700 dark:text-zinc-300" placement="left"> + <.sheet + :if={lastfm_artist_info.bio not in [nil, ""]} + id="bio" + class="max-w-2xl text-zinc-700 dark:text-zinc-300" + placement="left" + > {render_bio(lastfm_artist_info.bio)}