From 3961329955fd837ab7d1f759e52224934c397ced Mon Sep 17 00:00:00 2001 From: Baitinq Date: Tue, 1 Nov 2022 20:40:20 +0100 Subject: Frontend: Result component: Show "No Description" if empty description --- frontend/src/app.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/frontend/src/app.rs b/frontend/src/app.rs index 2389922..b2637ac 100644 --- a/frontend/src/app.rs +++ b/frontend/src/app.rs @@ -33,8 +33,11 @@ fn result_component(props: &ResultComponentProps) -> Html {

{props.result.url.clone()}

{props.result.title.clone()}

-

//No description if no description - {props.result.description.clone()}{format!("PRIO: {}", props.result.priority)} +

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

} -- cgit 1.4.1