mentorenwahl/frontend/src/main.rs
Dominic Grimm 860ae7ed5e
All checks were successful
continuous-integration/drone/push Build is passing
Rewrite frontend in rust with yew
2022-11-04 21:23:36 +01:00

23 lines
450 B
Rust

use yew::prelude::*;
use yew_router::prelude::*;
#[global_allocator]
static ALLOC: wee_alloc::WeeAlloc = wee_alloc::WeeAlloc::INIT;
use frontend::routes;
#[function_component(App)]
fn app() -> 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>();
}