🩹 Corrige doc y código por cambios en Page

This commit is contained in:
Manuel Cillero 2025-09-09 01:01:18 +02:00
parent 3ba71dbe45
commit 2a4d6a7890
4 changed files with 6 additions and 6 deletions

View file

@ -59,8 +59,8 @@ impl Extension for HelloWorld {
}
async fn hello_world(request: HttpRequest) -> ResultPage<Markup, ErrorPage> {
Page::new(Some(request))
.with_component(Html::with(move |_| html! { h1 { "Hello World!" } }))
Page::new(request)
.add_component(Html::with(move |_| html! { h1 { "Hello World!" } }))
.render()
}

View file

@ -13,7 +13,7 @@ async fn hello_name(
path: service::web::Path<String>,
) -> ResultPage<Markup, ErrorPage> {
let name = path.into_inner();
Page::new(Some(request))
Page::new(request)
.add_component(Html::with(move |_| html! { h1 { "Hello " (name) "!" } }))
.render()
}

View file

@ -9,7 +9,7 @@ impl Extension for HelloWorld {
}
async fn hello_world(request: HttpRequest) -> ResultPage<Markup, ErrorPage> {
Page::new(Some(request))
Page::new(request)
.add_component(Html::with(move |_| html! { h1 { "Hello World!" } }))
.render()
}

View file

@ -60,8 +60,8 @@ impl Extension for HelloWorld {
}
async fn hello_world(request: HttpRequest) -> ResultPage<Markup, ErrorPage> {
Page::new(Some(request))
.with_component(Html::with(move |_| html! { h1 { "Hello World!" } }))
Page::new(request)
.add_component(Html::with(move |_| html! { h1 { "Hello World!" } }))
.render()
}