diff --git a/client/src/main.rs b/client/src/main.rs index 880050a..d21894f 100644 --- a/client/src/main.rs +++ b/client/src/main.rs @@ -40,10 +40,25 @@ fn App() -> Html { html! {

{text}

} }) .collect(); + let flash = move |_| { + wasm_bindgen_futures::spawn_local(async move { + match reqwasm::http::Request::get(&format!("{API_URL}/flash")) + .send() + .await + { + Ok(response) => match response.json::().await { + Ok(_) => {} + Err(e) => println!("error getting text: {e:#?}"), + }, + Err(e) => println!("request error: {e:#?}"), + } + }) + }; html! {
{text_elements} +
} }