mentorenwahl/frontend/src/components/title.rs
Dominic Grimm 8055a5e4db
Some checks failed
continuous-integration/drone/push Build is failing
Update
2023-01-17 06:56:19 +01:00

27 lines
513 B
Rust

use bounce::helmet::Helmet;
use yew::prelude::*;
#[derive(Properties, PartialEq)]
pub struct TitleProps {
pub title: String,
}
pub struct Title;
impl Component for Title {
type Message = ();
type Properties = TitleProps;
fn create(_ctx: &Context<Self>) -> Self {
Self
}
fn view(&self, ctx: &Context<Self>) -> Html {
html! {
<Helmet>
<title>{ format!("{} | Mentorenwahl", ctx.props().title) }</title>
</Helmet>
}
}
}