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

37 lines
851 B
Rust

use bounce::helmet::HelmetBridge;
use bounce::BounceRoot;
use yew::prelude::*;
use yew_router::prelude::*;
#[global_allocator]
static ALLOC: wee_alloc::WeeAlloc = wee_alloc::WeeAlloc::INIT;
pub struct App;
impl Component for App {
type Message = ();
type Properties = ();
fn create(_ctx: &Context<Self>) -> Self {
Self
}
fn view(&self, _ctx: &Context<Self>) -> Html {
html! {
<BounceRoot>
<HelmetBridge default_title="Mentorenwahl" />
<BrowserRouter>
<Switch<frontend::routes::Route> render={frontend::routes::switch} />
</BrowserRouter>
</BounceRoot>
}
}
}
fn main() {
#[cfg(target_arch = "wasm32")]
wasm_logger::init(wasm_logger::Config::default());
yew::Renderer::<App>::new().render();
}