40 lines
1.0 KiB
Rust
40 lines
1.0 KiB
Rust
use yew::prelude::*;
|
|
|
|
use crate::{components, layouts};
|
|
|
|
#[derive(Properties, PartialEq)]
|
|
pub struct Props {
|
|
#[prop_or_default]
|
|
pub children: Children,
|
|
}
|
|
|
|
pub struct Main;
|
|
|
|
impl Component for Main {
|
|
type Message = ();
|
|
type Properties = Props;
|
|
|
|
fn create(_ctx: &Context<Self>) -> Self {
|
|
Self
|
|
}
|
|
|
|
fn view(&self, ctx: &Context<Self>) -> Html {
|
|
html! {
|
|
<>
|
|
<layouts::Base>
|
|
<div class={classes!("columns", "is-centered")}>
|
|
<main id="main" class={classes!("column", "is-four-fifths")}>
|
|
{ for ctx.props().children.iter() }
|
|
</main>
|
|
</div>
|
|
</layouts::Base>
|
|
<div id="notifications" class={classes!("columns")}>
|
|
<div id="notifications-column" class={classes!("column", "is-one-third")}>
|
|
<components::NotificationListing />
|
|
</div>
|
|
</div>
|
|
</>
|
|
}
|
|
}
|
|
}
|