Auto-dismiss error toasts after 10 seconds
This commit is contained in:
6 files changed
+29
-4
No files matched your search
@@ -4,6 +4,7 @@ use sycamore::prelude::*;
|
||||
use sycamore_router::navigate;
|
||||
|
||||
use crate::api;
|
||||
use crate::components::toast::toast;
|
||||
use crate::model::{GameTypeInfo, User};
|
||||
|
||||
/// Used when the game-types fetch fails: match creation must still work.
|
||||
@@ -70,7 +71,7 @@ pub fn LobbyPage() -> View {
|
||||
view! {
|
||||
div(class="lobby") {
|
||||
h1 { "Scopone scientifico" }
|
||||
(move || error.get_clone().map(|e| view! { div(class="toast") { (e) } }))
|
||||
(toast(error))
|
||||
(move || match user.get_clone() {
|
||||
None => view! { p(class="status") { "Loading…" } },
|
||||
Some(None) => view! {
|
||||
|
||||
Reference in new issue
Block a user