simpler render syntax

This commit is contained in:
Zynh Ludwig 2024-08-30 23:06:13 -07:00
parent c9aac19f8b
commit 7f62c9b6a8
2 changed files with 2 additions and 6 deletions

View file

@ -28,9 +28,7 @@ async fn link(
{
return Ok(Html(ssr::render({
let record = record.clone();
|| {
leptos::view! { <DownloadLinkPage id=id record=record /> }
}
|| leptos::view! { <DownloadLinkPage id=id record=record /> }
})));
}
}

View file

@ -92,9 +92,7 @@ async fn upload_to_zip(
.status(200)
.header("Content-Type", "text/html")
.header("HX-Push-Url", format!("/link/{}", &id))
.body(ssr::render(|| {
leptos::view! { <LinkView id record /> }
}))
.body(ssr::render(|| leptos::view! { <LinkView id record /> }))
.unwrap();
Ok(response)