chore: convert to logs

This commit is contained in:
Jonathan Kelley committed 2022-12-13 12:38:27 -08:00
1 parent d4b6bb8a7b
commit 79e786aca5
2 files changed
+6 -4

No files matched your search

+3 -1
View File
@@ -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
View File
@@ -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!(()))
}
}