From 86e5e733b37a994973ad2ce1eca6605c514dec5c Mon Sep 17 00:00:00 2001 From: Daniel Miller Date: Wed, 11 Dec 2024 03:44:43 +0000 Subject: [PATCH] Add artist detail component for name/bio/image --- src/pages/artist.rs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/pages/artist.rs b/src/pages/artist.rs index 249f268..b7ff17a 100644 --- a/src/pages/artist.rs +++ b/src/pages/artist.rs @@ -69,3 +69,21 @@ fn ArtistProfile(#[prop(into)] id: MaybeSignal) -> impl IntoView { } } + +#[component] +fn ArtistDetails(artist: Artist) -> impl IntoView { + let artist_id = artist.id.unwrap(); + let profile_image_path = format!("/assets/images/artist/{}.webp", artist_id); + + view! { +
+ + + +

{artist.name}

+
+
+

{artist.bio.unwrap_or_else(|| "No bio available.".to_string())}

+
+ } +}