mentorenwahl/frontend/src/main.rs
Dominic Grimm ff2b884d42
All checks were successful
continuous-integration/drone/push Build is passing
Agent oriented logged in state
2022-11-05 21:27:49 +01:00

33 lines
639 B
Rust

use yew::prelude::*;
use yew_router::prelude::*;
use frontend::routes;
#[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! {
<BrowserRouter>
<Switch<routes::Route> render={Switch::render(routes::switch)} />
</BrowserRouter>
}
}
}
fn main() {
wasm_logger::init(wasm_logger::Config::default());
yew::start_app::<App>();
}