From ab126ea4df01af6ca7da2118740fca8ffd22ac37 Mon Sep 17 00:00:00 2001 From: Baitinq Date: Wed, 2 Nov 2022 21:39:32 +0100 Subject: Lib+Indexer: Make IndexedResource title and description Optional --- frontend/src/app.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'frontend') diff --git a/frontend/src/app.rs b/frontend/src/app.rs index 064d49a..f65e29c 100644 --- a/frontend/src/app.rs +++ b/frontend/src/app.rs @@ -39,6 +39,7 @@ fn result_component(props: &ResultComponentProps) -> Html { ) .unwrap(); let style = style.get_class_name().to_owned(); + html! {
@@ -46,9 +47,9 @@ fn result_component(props: &ResultComponentProps) -> Html {

{props.result.title.clone()}

- {match props.result.description.clone().as_str() { - "" => "No Description.", - otherwise => otherwise, + {match props.result.description.clone() { + None => "No Description.".to_string(), + Some(description) => description.to_owned(), }}{format!("PRIO: {}", props.result.priority)}

-- cgit 1.4.1