remove some logging

This commit is contained in:
Evan Almloff 2023-07-26 10:28:49 -07:00
parent e7a9161066
commit 0ebcb5f1be
3 changed files with 25 additions and 24 deletions

View file

@ -9,21 +9,7 @@ use dioxus_ssr::incremental::{DefaultRenderer, IncrementalRendererConfig};
#[tokio::main]
async fn main() {
let mut renderer = IncrementalRendererConfig::new(DefaultRenderer {
before_body: r#"<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,
initial-scale=1.0">
<title>Dioxus Application</title>
</head>
<body>"#
.to_string(),
after_body: r#"</body>
</html>"#
.to_string(),
})
let mut renderer = IncrementalRendererConfig::new()
.static_dir("./static")
.invalidate_after(Duration::from_secs(10))
.build();
@ -44,7 +30,24 @@ async fn main() {
.join("\n")
);
pre_cache_static_routes::<Route, _>(&mut renderer)
pre_cache_static_routes::<Route, _>(
&mut renderer,
&DefaultRenderer {
before_body: r#"<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,
initial-scale=1.0">
<title>Dioxus Application</title>
</head>
<body>"#
.to_string(),
after_body: r#"</body>
</html>"#
.to_string(),
},
)
.await
.unwrap();
}

View file

@ -358,8 +358,6 @@ where
fn current_route(&self) -> Box<dyn Any> {
let route = self.inner.current_route();
println!("current_route {route}");
println!("current_route type {}", std::any::type_name::<R>());
Box::new(route)
}

View file

@ -95,7 +95,7 @@ where
{
let path = path.clone();
render! {
Link::<R> {
Router::<R> {
config: || RouterConfig::default().history(MemoryHistory::with_initial_path(path))
}
}