From bbe4e66648edc684057bc7a9b06b5bf21690af27 Mon Sep 17 00:00:00 2001 From: CorvusPrudens Date: Sat, 3 Aug 2024 23:44:56 -0600 Subject: [PATCH] Added newer spawn paths --- src/lib.rs | 1 - src/use_clipboard.rs | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index f747ea3..8d765e9 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -75,7 +75,6 @@ mod use_throttle_fn; mod use_timeout_fn; mod use_timestamp; mod use_to_string; -mod use_user_media; mod use_web_notification; mod use_websocket; mod use_window; diff --git a/src/use_clipboard.rs b/src/use_clipboard.rs index 42ffc5a..56cf77a 100644 --- a/src/use_clipboard.rs +++ b/src/use_clipboard.rs @@ -79,7 +79,7 @@ pub fn use_clipboard_with_options( let update_text = move |_| { if is_supported.get() { - spawn_local(async move { + leptos::spawn::spawn_local(async move { if let Some(clipboard) = window().navigator().clipboard() { if let Ok(text) = js_fut!(clipboard.read_text()).await { set_text.set(text.as_string()); @@ -102,7 +102,7 @@ pub fn use_clipboard_with_options( let start = start.clone(); let value = value.to_owned(); - spawn_local(async move { + leptos::spawn::spawn_local(async move { if let Some(clipboard) = window().navigator().clipboard() { if js_fut!(clipboard.write_text(&value)).await.is_ok() { set_text.set(Some(value));