{ for items.iter().map(|a| {
let name = a.name.clone();
let mbid = a.id.clone();
let on_add = on_add_artist.clone();
html! {
{ &a.name }
if let Some(ref d) = a.disambiguation {
{ format!(" ({d})") }
}
{ a.country.as_deref().unwrap_or("") }
{ a.artist_type.as_deref().unwrap_or("") }
{ a.score }
}
})}
},
SearchResults::Albums(items) => html! {
{ "Title" }
{ "Artist" }
{ "Year" }
{ "Score" }
{ for items.iter().map(|a| {
let artist = a.artist.clone();
let title = a.title.clone();
let mbid = a.id.clone();
let on_add = on_add_album.clone();
html! {