fix(frontend): robust loading spinner removal using css class
This commit is contained in:
@@ -14,6 +14,12 @@ pub fn main() {
|
||||
|
||||
let window = web_sys::window().unwrap();
|
||||
let document = window.document().unwrap();
|
||||
let body = document.body().unwrap();
|
||||
|
||||
// Add app-loaded class to body to hide spinner via CSS
|
||||
let _ = body.class_list().add_1("app-loaded");
|
||||
|
||||
// Also try to remove it directly
|
||||
if let Some(loader) = document.get_element_by_id("app-loading") {
|
||||
loader.remove();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user