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

34 lines
718 B
Rust

use yew::prelude::*;
use crate::components;
#[derive(Properties, PartialEq)]
pub struct BaseProps {
pub token: Option<String>,
#[prop_or_default]
pub children: Children,
}
pub struct Base;
impl Component for Base {
type Message = ();
type Properties = BaseProps;
fn create(_ctx: &Context<Self>) -> Self {
Self
}
fn view(&self, ctx: &Context<Self>) -> Html {
html! {
<>
<div id="wrapper">
<components::navbar::Navbar token={ctx.props().token.to_owned()} />
{ for ctx.props().children.iter() }
</div>
<components::footer::Footer />
</>
}
}
}