mod app; use app::OSSE; use yew::prelude::*; use yew_router::prelude::*; #[derive(Clone, Routable, PartialEq)] enum Route { #[at("/")] OSSEHome, #[at("/search/")] OSSEHomeEmptySearch, #[at("/search/:query")] OSSESearch { query: String }, } fn switch_routes(routes: Route) -> Html { match routes { Route::OSSEHome | Route::OSSEHomeEmptySearch => html! { } /> }, Route::OSSESearch { query } => html! { }, } } #[function_component(App)] fn yew_app() -> Html { html! { <> render={switch_routes} /> } } fn main() { yew::Renderer::::new().render(); }