From 0cf58410238bd7140a4048987c94dac02f2a5ab1 Mon Sep 17 00:00:00 2001 From: spinline Date: Sat, 31 Jan 2026 14:44:51 +0300 Subject: [PATCH] fix(frontend): remove loading spinner on app mount --- frontend/Cargo.toml | 2 +- frontend/src/lib.rs | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/frontend/Cargo.toml b/frontend/Cargo.toml index c6f3d90..532f177 100644 --- a/frontend/Cargo.toml +++ b/frontend/Cargo.toml @@ -18,6 +18,6 @@ wasm-bindgen = "0.2" uuid = { version = "1", features = ["v4", "js"] } futures = "0.3" chrono = { version = "0.4", features = ["serde"] } -web-sys = { version = "0.3", features = ["Window", "Storage"] } +web-sys = { version = "0.3", features = ["Window", "Storage", "Document", "Element"] } shared = { path = "../shared" } tailwind_fuse = "0.3.2" diff --git a/frontend/src/lib.rs b/frontend/src/lib.rs index 38b88a7..b85bb2a 100644 --- a/frontend/src/lib.rs +++ b/frontend/src/lib.rs @@ -12,5 +12,11 @@ pub fn main() { console_error_panic_hook::set_once(); console_log::init_with_level(log::Level::Debug).unwrap(); + let window = web_sys::window().unwrap(); + let document = window.document().unwrap(); + if let Some(loader) = document.get_element_by_id("app-loading") { + loader.remove(); + } + mount_to_body(|| view! { }) }