use crate::navbar::Navbar; use crate::pages::{profile::Profile, settings::Settings}; use yew::prelude::*; use yew_router::prelude::*; #[derive(Clone, Routable, PartialEq)] pub enum Route { #[at("/")] Profile, #[at("/settings")] Settings, #[not_found] #[at("/404")] NotFound, } fn switch(routes: Route) -> Html { match routes { Route::Settings => html! { }, Route::Profile => html! { }, Route::NotFound => html! {

{ "404 - Not Found" }

}, } } #[function_component(App)] pub fn app() -> Html { html! {
render={switch} />
} }