diff --git a/pgml-dashboard/src/components/layouts/head/mod.rs b/pgml-dashboard/src/components/layouts/head/mod.rs index f64e907c7..1111815ad 100644 --- a/pgml-dashboard/src/components/layouts/head/mod.rs +++ b/pgml-dashboard/src/components/layouts/head/mod.rs @@ -1,4 +1,4 @@ -use pgml_components::{component, Component}; +use pgml_components::component; use sailfish::TemplateOnce; #[derive(TemplateOnce, Default, Clone)] @@ -10,7 +10,6 @@ pub struct Head { pub preloads: Vec, pub context: Option, pub canonical: Option, - pub additional_components: Vec, } impl Head { @@ -59,25 +58,6 @@ impl Head { self.context = context.to_owned(); self } - - /// Add a component to ``. - /// - /// This can be anything, e.g. a `")); - /// ``` - /// - pub fn add_component(mut self, component: Component) -> Self { - self.additional_components.push(component); - self - } } component!(Head); diff --git a/pgml-dashboard/src/components/layouts/head/template.html b/pgml-dashboard/src/components/layouts/head/template.html index 823dbb80a..3ad5d44a9 100644 --- a/pgml-dashboard/src/components/layouts/head/template.html +++ b/pgml-dashboard/src/components/layouts/head/template.html @@ -97,8 +97,4 @@ }; <% } %> - - <% for component in additional_components { %> - <%+ component %> - <% } %> diff --git a/pgml-dashboard/src/components/layouts/marketing/base/mod.rs b/pgml-dashboard/src/components/layouts/marketing/base/mod.rs index 15d983756..5d1ee0d36 100644 --- a/pgml-dashboard/src/components/layouts/marketing/base/mod.rs +++ b/pgml-dashboard/src/components/layouts/marketing/base/mod.rs @@ -3,7 +3,7 @@ use crate::components::notifications::marketing::AlertBanner; use crate::guards::Cluster; use crate::models::User; use crate::Notification; -use pgml_components::{component, Component}; +use pgml_components::component; use sailfish::TemplateOnce; use std::fmt; @@ -72,15 +72,6 @@ impl Base { rsp } - /// Add a component to the ``. - /// - /// See [`Head::add_component`](crate::components::layouts::Head::add_component) for more information. - /// - pub fn add_head_component(mut self, component: Component) -> Self { - self.head = self.head.add_component(component); - self - } - pub fn footer(mut self, footer: String) -> Self { self.footer = Some(footer); self diff --git a/pgml-dashboard/src/templates/mod.rs b/pgml-dashboard/src/templates/mod.rs index d6328661e..39a614f85 100644 --- a/pgml-dashboard/src/templates/mod.rs +++ b/pgml-dashboard/src/templates/mod.rs @@ -163,17 +163,6 @@ impl<'a> WebAppBase<'a> { self } - /// Add a component to head (``). - /// - /// # Arguments - /// - /// * `component` - The component to add to the head. - /// - pub fn add_head_component(&mut self, component: Component) -> &mut Self { - self.head = self.head.clone().add_component(component); - self - } - pub fn render(&mut self, template: T) -> String where T: sailfish::TemplateOnce,