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,21 +9,7 @@ use dioxus_ssr::incremental::{DefaultRenderer, IncrementalRendererConfig};
|
||||||
|
|
||||||
#[tokio::main]
|
#[tokio::main]
|
||||||
async fn main() {
|
async fn main() {
|
||||||
let mut renderer = IncrementalRendererConfig::new(DefaultRenderer {
|
let mut renderer = IncrementalRendererConfig::new()
|
||||||
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")
|
.static_dir("./static")
|
||||||
.invalidate_after(Duration::from_secs(10))
|
.invalidate_after(Duration::from_secs(10))
|
||||||
.build();
|
.build();
|
||||||
|
@ -44,7 +30,24 @@ async fn main() {
|
||||||
.join("\n")
|
.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
|
.await
|
||||||
.unwrap();
|
.unwrap();
|
||||||
}
|
}
|
||||||
|
|
|
@ -358,8 +358,6 @@ where
|
||||||
|
|
||||||
fn current_route(&self) -> Box<dyn Any> {
|
fn current_route(&self) -> Box<dyn Any> {
|
||||||
let route = self.inner.current_route();
|
let route = self.inner.current_route();
|
||||||
println!("current_route {route}");
|
|
||||||
println!("current_route type {}", std::any::type_name::<R>());
|
|
||||||
Box::new(route)
|
Box::new(route)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -95,7 +95,7 @@ where
|
||||||
{
|
{
|
||||||
let path = path.clone();
|
let path = path.clone();
|
||||||
render! {
|
render! {
|
||||||
Link::<R> {
|
Router::<R> {
|
||||||
config: || RouterConfig::default().history(MemoryHistory::with_initial_path(path))
|
config: || RouterConfig::default().history(MemoryHistory::with_initial_path(path))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue