♻️ Cambia en prepare_component() el tipo devuelto

Elimina `PrepareMarkup` como tipo de retorno de prepare_component() y de
`FnPrepareRender`, sustituyéndolo directamente por `Markup`. Se elimina
una capa innecesaria, ya que html! {} y html! { ... } cubren todos los
casos que ofrecía `PrepareMarkup`.
This commit is contained in:
Manuel Cillero 2026-03-17 20:04:26 +01:00 committed by Manuel Cillero
parent 6203a02b89
commit 908fd969e4
28 changed files with 241 additions and 335 deletions

View file

@ -25,8 +25,8 @@ impl Component for PoweredBy {
PoweredBy { copyright: Some(c) }
}
fn prepare_component(&self, cx: &mut Context) -> PrepareMarkup {
PrepareMarkup::With(html! {
fn prepare_component(&self, cx: &mut Context) -> Markup {
html! {
div id=[self.id()] class="poweredby" {
@if let Some(c) = self.copyright() {
span class="poweredby__copyright" { (c) "." } " "
@ -35,7 +35,7 @@ impl Component for PoweredBy {
(L10n::l("poweredby_pagetop").with_arg("pagetop_link", LINK).using(cx))
}
}
})
}
}
}