Needed to add error printing for testing.

This commit is contained in:
2025-09-06 16:27:30 -04:00
parent ce52a944e6
commit 341d1b329c
2 changed files with 7 additions and 3 deletions

View File

@ -283,9 +283,13 @@ pub fn PostHeader(title: String, author: String, tags: Vec<String>) -> Element
pub fn BlogPost(slug: String, children: Element) -> Element
{
// 1. Fetch the blog post using the slug.
let Ok(post) = use_server_future(move || get_blog_post(slug.clone())) else
let post = match use_server_future(move || get_blog_post(slug.clone()))
{
return rsx! { p { "Failed to load post." } }
Ok(post) => { post }
Err(e) =>
{
return rsx! { p { "Failed to load post." } p { "{e}" } }
}
};
// Then build the component.