Get more axum stuff upgraded to 0.7
This commit is contained in:
25 files changed
+202
-193
No files matched your search
@@ -15,7 +15,7 @@ use serde::{Deserialize, Serialize};
|
||||
#[tokio::main]
|
||||
async fn main() {
|
||||
pre_cache_static_routes_with_props(
|
||||
&ServerConfig::new_with_router(
|
||||
&ServeConfig::new_with_router(
|
||||
dioxus_fullstack::router::FullstackRouterConfig::<Route>::default(),
|
||||
)
|
||||
.assets_path("docs")
|
||||
@@ -37,13 +37,11 @@ fn main() {
|
||||
);
|
||||
}
|
||||
|
||||
#[cfg(not(any(feature = "web", feature = "server")))]
|
||||
fn main() {}
|
||||
|
||||
#[derive(Clone, Routable, Debug, PartialEq, Serialize, Deserialize)]
|
||||
enum Route {
|
||||
#[route("/")]
|
||||
Home {},
|
||||
|
||||
#[route("/blog")]
|
||||
Blog,
|
||||
}
|
||||
@@ -72,10 +70,7 @@ fn Home() -> Element {
|
||||
let text = use_signal(|| "...".to_string());
|
||||
|
||||
rsx! {
|
||||
Link {
|
||||
to: Route::Blog {},
|
||||
"Go to blog"
|
||||
}
|
||||
Link { to: Route::Blog {}, "Go to blog" }
|
||||
div {
|
||||
h1 { "High-Five counter: {count}" }
|
||||
button { onclick: move |_| count += 1, "Up high!" }
|
||||
|
||||
Reference in new issue
Block a user