Pages link to each other

This commit is contained in:
2026-05-02 10:41:11 +02:00
parent 6d8fcc6b53
commit 3d1366e704
3 changed files with 26 additions and 14 deletions

View File

@@ -1,6 +1,7 @@
use gloo_net::http::Request;
use wasm_bindgen_futures::spawn_local;
use yew::prelude::*;
use yew_router::prelude::*;
#[component(Home)]
pub fn home_component() -> Html {
@@ -31,7 +32,7 @@ pub fn home_component() -> Html {
match *is_admin {
None => html! { <div>{ "Loading..." }</div> },
Some(true) => html! { <div>{ "You are admin" }</div> },
Some(false) => html! { <div>{ "You are a normal user" }</div> },
Some(false) => html! { <Redirect<crate::Route> to={crate::Route::Ticket}/> },
}
}