Pages link to each other
This commit is contained in:
@@ -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}/> },
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user