Pārlūkot izejas kodu

chore: convert to logs

Jonathan Kelley 2 gadi atpakaļ
vecāks
revīzija
79e786aca5

+ 3 - 1
packages/router/Cargo.toml

@@ -51,7 +51,9 @@ wasm-logger = "0.2.0"
 wasm-bindgen-test = "0.3"
 gloo-utils = "0.1.2"
 dioxus-web = { path = "../web" }
-dioxus-desktop = { path = "../desktop" }
+# dioxus-desktop = { path = "../desktop", optional = true }
+
+# not wasm
 
 [target.wasm32-unknown-unknown.dev-dependencies]
 dioxus-router = { path = ".", features = ["web"] }

+ 3 - 3
packages/router/src/components/route.rs

@@ -45,13 +45,13 @@ pub fn Route<'a>(cx: Scope<'a, RouteProps<'a>>) -> Element {
         router_root.register_total_route(route_context.total_route, cx.scope_id());
     });
 
-    println!("Checking Route: {:?}", cx.props.to);
+    log::debug!("Checking Route: {:?}", cx.props.to);
 
     if router_root.should_render(cx.scope_id()) {
-        println!("Route should render: {:?}", cx.scope_id());
+        log::debug!("Route should render: {:?}", cx.scope_id());
         cx.render(rsx!(&cx.props.children))
     } else {
-        println!("Route should *not* render: {:?}", cx.scope_id());
+        log::debug!("Route should *not* render: {:?}", cx.scope_id());
         cx.render(rsx!(()))
     }
 }