Leptos updated to 0.5
This commit is contained in:
+5
-4
@@ -1,3 +1,4 @@
|
||||
use actix_web::middleware::DefaultHeaders;
|
||||
use sqlx::migrate;
|
||||
use sqlx::postgres::PgPoolOptions;
|
||||
|
||||
@@ -18,7 +19,7 @@ async fn main() -> std::io::Result<()> {
|
||||
let conf = get_configuration(None).await.unwrap();
|
||||
let addr = conf.leptos_options.site_addr;
|
||||
// Generate the list of routes in your Leptos App
|
||||
let routes = generate_route_list(|cx| view! { cx, <App/> });
|
||||
let routes = generate_route_list(|| view! { <App/> });
|
||||
let key = Key::generate();
|
||||
|
||||
let pool = PgPoolOptions::new()
|
||||
@@ -41,7 +42,7 @@ async fn main() -> std::io::Result<()> {
|
||||
.leptos_routes(
|
||||
leptos_options.to_owned(),
|
||||
routes.to_owned(),
|
||||
|cx| view! { cx, <App/> },
|
||||
|| view! { <App/> },
|
||||
)
|
||||
.service(Files::new("/", site_root))
|
||||
//.wrap(middleware::Compress::default())
|
||||
@@ -70,9 +71,9 @@ pub fn main() {
|
||||
|
||||
console_error_panic_hook::set_once();
|
||||
|
||||
leptos::mount_to_body(move |cx| {
|
||||
leptos::mount_to_body(move || {
|
||||
// note: for testing it may be preferrable to replace this with a
|
||||
// more specific component, although leptos_router should still work
|
||||
view! {cx, <App/> }
|
||||
view! {<App/> }
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user