mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-11-23 12:43:08 +00:00
remove some logging
This commit is contained in:
parent
e7a9161066
commit
0ebcb5f1be
3 changed files with 25 additions and 24 deletions
|
@ -9,24 +9,10 @@ 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(),
|
||||
})
|
||||
.static_dir("./static")
|
||||
.invalidate_after(Duration::from_secs(10))
|
||||
.build();
|
||||
let mut renderer = IncrementalRendererConfig::new()
|
||||
.static_dir("./static")
|
||||
.invalidate_after(Duration::from_secs(10))
|
||||
.build();
|
||||
|
||||
println!(
|
||||
"SITE MAP:\n{}",
|
||||
|
@ -44,9 +30,26 @@ async fn main() {
|
|||
.join("\n")
|
||||
);
|
||||
|
||||
pre_cache_static_routes::<Route, _>(&mut renderer)
|
||||
.await
|
||||
.unwrap();
|
||||
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();
|
||||
}
|
||||
|
||||
#[inline_props]
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
|
@ -95,7 +95,7 @@ where
|
|||
{
|
||||
let path = path.clone();
|
||||
render! {
|
||||
Link::<R> {
|
||||
Router::<R> {
|
||||
config: || RouterConfig::default().history(MemoryHistory::with_initial_path(path))
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue