forked from alemi/upub
fix(web): show summary row only if present
quite jank way to do it but im tired
This commit is contained in:
parent
764f810ff9
commit
5de3e6622f
1 changed files with 9 additions and 3 deletions
|
@ -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()
|
||||||
|
|
Loading…
Reference in a new issue