diff --git a/src/lib.rs b/src/lib.rs index 5c7d528..a9d9668 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -33,6 +33,6 @@ pub fn init() { tracing::info!("VBStack initialized"); - // Initialize Nostr client - hooks::use_nostr_client::init_nostr_client(); + // Note: Nostr client initialization moved to App component + // to run within Dioxus runtime context } diff --git a/src/main.rs b/src/main.rs index 19f0b12..c024434 100644 --- a/src/main.rs +++ b/src/main.rs @@ -16,6 +16,13 @@ fn main() { /// Root application component #[component] fn App() -> Element { + use vbstack::hooks::use_nostr_client::init_nostr_client; + + // Initialize Nostr client within the Dioxus runtime + use_effect(move || { + init_nostr_client(); + }); + rsx! { Router:: {} }