diff options
author | Baitinq <manuelpalenzuelamerino@gmail.com> | 2022-11-02 21:39:32 +0100 |
---|---|---|
committer | Baitinq <manuelpalenzuelamerino@gmail.com> | 2022-11-02 21:39:32 +0100 |
commit | ab126ea4df01af6ca7da2118740fca8ffd22ac37 (patch) | |
tree | 7ce8fbfa8a1ee8bf7de7a4a7e50cb2c8a132f076 /frontend | |
parent | Indexer: Abstract indexer (diff) | |
download | OSSE-ab126ea4df01af6ca7da2118740fca8ffd22ac37.tar.gz OSSE-ab126ea4df01af6ca7da2118740fca8ffd22ac37.tar.bz2 OSSE-ab126ea4df01af6ca7da2118740fca8ffd22ac37.zip |
Lib+Indexer: Make IndexedResource title and description Optional
Diffstat (limited to 'frontend')
-rw-r--r-- | frontend/src/app.rs | 7 |
1 files changed, 4 insertions, 3 deletions
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! { <div class={format!("mb-4 {}", style)}> <a href={props.result.url.clone()}> @@ -46,9 +47,9 @@ fn result_component(props: &ResultComponentProps) -> Html { <p class="title mb-1">{props.result.title.clone()}</p> </a> <p class="description"> - {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)} </p> </div> |