mirror of
https://github.com/imgurbot12/rmenu.git
synced 2025-01-27 05:18:33 +01:00
feat: include default alt-icon when icon is missing
This commit is contained in:
parent
3f7baff1fb
commit
19901cbe34
1 changed files with 2 additions and 4 deletions
|
@ -63,10 +63,8 @@ fn render_image<'a, T>(
|
|||
return cx.render(rsx! { img { class: "image", src: "{img}" } });
|
||||
}
|
||||
}
|
||||
if let Some(alt) = alt {
|
||||
return cx.render(rsx! { div { class: "icon_alt", dangerous_inner_html: "{alt}" } });
|
||||
}
|
||||
None
|
||||
let alt = alt.map(|s| s.as_str()).unwrap_or_else(|| "?");
|
||||
return cx.render(rsx! { div { class: "icon_alt", dangerous_inner_html: "{alt}" } });
|
||||
}
|
||||
|
||||
/// render a single result entry w/ the given information
|
||||
|
|
Loading…
Reference in a new issue