mirror of
https://github.com/imgurbot12/rmenu.git
synced 2024-09-20 11:31:18 +02:00
feat: include default alt-icon when icon is missing
This commit is contained in:
parent
3f7baff1fb
commit
19901cbe34
@ -63,10 +63,8 @@ fn render_image<'a, T>(
|
|||||||
return cx.render(rsx! { img { class: "image", src: "{img}" } });
|
return cx.render(rsx! { img { class: "image", src: "{img}" } });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if let Some(alt) = alt {
|
let alt = alt.map(|s| s.as_str()).unwrap_or_else(|| "?");
|
||||||
return cx.render(rsx! { div { class: "icon_alt", dangerous_inner_html: "{alt}" } });
|
return cx.render(rsx! { div { class: "icon_alt", dangerous_inner_html: "{alt}" } });
|
||||||
}
|
|
||||||
None
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// render a single result entry w/ the given information
|
/// render a single result entry w/ the given information
|
||||||
|
Loading…
Reference in New Issue
Block a user