♻️ 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:
parent
a5ee0fecb1
commit
3e1bc0fb0e
28 changed files with 241 additions and 335 deletions
|
|
@ -115,7 +115,7 @@ impl Component for Intro {
|
|||
));
|
||||
}
|
||||
|
||||
fn prepare_component(&self, cx: &mut Context) -> PrepareMarkup {
|
||||
fn prepare_component(&self, cx: &mut Context) -> Markup {
|
||||
if *self.opening() == IntroOpening::PageTop {
|
||||
cx.alter_assets(ContextOp::AddJavaScript(JavaScript::on_load_async("intro-js", |cx|
|
||||
util::indoc!(r#"
|
||||
|
|
@ -135,7 +135,7 @@ impl Component for Intro {
|
|||
)));
|
||||
}
|
||||
|
||||
PrepareMarkup::With(html! {
|
||||
html! {
|
||||
div class="intro" {
|
||||
div class="intro-header" {
|
||||
section class="intro-header__body" {
|
||||
|
|
@ -206,7 +206,7 @@ impl Component for Intro {
|
|||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue