From 79e786aca58a6e86bc039c417526a118a6cb9733 Mon Sep 17 00:00:00 2001 From: Jonathan Kelley Date: Tue, 13 Dec 2022 12:38:27 -0800 Subject: [PATCH] chore: convert to logs --- packages/router/Cargo.toml | 4 +++- packages/router/src/components/route.rs | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/router/Cargo.toml b/packages/router/Cargo.toml index 9832850a1..5b72e8117 100644 --- a/packages/router/Cargo.toml +++ b/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"] } diff --git a/packages/router/src/components/route.rs b/packages/router/src/components/route.rs index 1ca13f48c..cf665d2e1 100644 --- a/packages/router/src/components/route.rs +++ b/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!(())) } }