fix(web): show summary row only if present

quite jank way to do it but im tired
This commit is contained in:
əlemi 2024-04-16 07:51:22 +02:00
parent 764f810ff9
commit 5de3e6622f
Signed by: alemi
GPG key ID: A4895B84D311642C

View file

@ -279,9 +279,15 @@ pub fn Object(object: serde_json::Value) -> impl IntoView {
view! { view! {
<div> <div>
<table class="post-table pa-1 mb-s" > <table class="post-table pa-1 mb-s" >
{move || if !summary.is_empty() {
view! {
<tr class="post-table" > <tr class="post-table" >
<td class="post-table pa-1" colspan="2" >{summary}</td> <td class="post-table pa-1" colspan="2" >{summary.clone()}</td>
</tr> </tr>
}.into_view()
} else {
view! { }.into_view()
}}
<tr class="post-table" > <tr class="post-table" >
<td class="post-table pa-1" colspan="2" >{ <td class="post-table pa-1" colspan="2" >{
content.into_iter().map(|x| view! { <p>{x}</p> }).collect_view() content.into_iter().map(|x| view! { <p>{x}</p> }).collect_view()