app: Fix the user detail view

This commit is contained in:
Valentin Tolmer 2021-08-31 20:18:19 +02:00 committed by nitnelave
parent 092cdb860c
commit 564c09d6ab
3 changed files with 3 additions and 3 deletions

View File

@ -1,5 +1,5 @@
query GetUserDetails($id: String!) {
user(id: $id) {
user(userId: $id) {
id
email
displayName

View File

@ -141,7 +141,7 @@ impl App {
fn get_redirect_route() -> Option<String> {
let route_service = RouteService::<()>::new();
let current_route = route_service.get_path();
if current_route.is_empty() || current_route.contains("login") {
if current_route.is_empty() || current_route == "/" || current_route.contains("login") {
None
} else {
Some(current_route)

View File

@ -94,7 +94,7 @@ impl Component for UserDetails {
<div>{"Display name: "}{&u.display_name.as_ref().unwrap_or(&String::new())}</div>
<div>{"First name: "}{&u.first_name.as_ref().unwrap_or(&String::new())}</div>
<div>{"Last name: "}{&u.last_name.as_ref().unwrap_or(&String::new())}</div>
<div>{"Creation date: "}{&u.creation_date}</div>
<div>{"Creation date: "}{&u.creation_date.with_timezone(&chrono::Local)}</div>
</div>
}
}