mentorenwahl/frontend/src/layouts/main.rs
Dominic Grimm 6620dea812
Some checks failed
continuous-integration/drone/push Build is failing
Update
2022-12-29 22:24:29 +01:00

36 lines
870 B
Rust

use yew::prelude::*;
// use crate::components;
use crate::layouts;
#[derive(Properties, PartialEq)]
pub struct MainProps {
pub token: Option<String>,
pub logged_in: bool,
#[prop_or_default]
pub children: Children,
}
pub struct Main;
impl Component for Main {
type Message = ();
type Properties = MainProps;
fn create(_ctx: &Context<Self>) -> Self {
Self
}
fn view(&self, ctx: &Context<Self>) -> Html {
html! {
<layouts::base::Base token={ctx.props().token.to_owned()} logged_in={ctx.props().logged_in}>
<div class={classes!("columns")}>
<main class={classes!("column", "is-four-fifths", "mx-auto")}>
{ for ctx.props().children.iter() }
</main>
</div>
</layouts::base::Base>
}
}
}