♻️ (bootsier, htmx): Adapta ciclo de render async

Añade `#[async_trait]` a todos los `impl Extension`, `Theme` y
`Component`. Convierte `prepare()` en `async fn` y añade `.await` a las
llamadas `render()` y `render_offcanvas()`.
This commit is contained in:
Manuel Cillero 2026-07-06 07:55:30 +02:00
parent 9354894b3a
commit 1139df6210
17 changed files with 68 additions and 42 deletions

View file

@ -25,13 +25,14 @@ pub struct Brand {
route: Option<FnPathByContext>,
}
#[async_trait]
impl Component for Brand {
fn new() -> Self {
Self::default()
}
fn prepare(&self, cx: &mut Context) -> Result<Markup, ComponentError> {
let image = self.image().render(cx);
async fn prepare(&self, cx: &mut Context) -> Result<Markup, ComponentError> {
let image = self.image().render(cx).await;
let title = self.title().using(cx);
if title.is_empty() && image.is_empty() {
return Ok(html! {});