diff options
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/src/main.rs b/src/main.rs index d3c4f58..8cffc27 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,4 +1,3 @@ - #[cfg(feature = "ssr")] #[tokio::main] async fn main() { @@ -7,7 +6,6 @@ async fn main() { use leptos::prelude::*; use leptos_axum::{generate_route_list, LeptosRoutes}; use stormscribe::components::app::*; - use stormscribe::data::content::ContentController; let conf = get_configuration(None).unwrap(); let addr = conf.leptos_options.site_addr; @@ -15,16 +13,9 @@ async fn main() { // Generate the list of routes in your Leptos App let routes = generate_route_list(App); - let data_dir = std::path::Path::join(&std::env::current_dir().unwrap(), "data"); - let content_controller = ContentController::init(data_dir).await.unwrap(); - let app = Router::new() - .route("/", get(|| async { - Redirect::temporary("/~/") - })) - .leptos_routes_with_context(&leptos_options, routes, move || { - provide_context(content_controller.clone()); - }, { + .route("/", get(|| async { Redirect::temporary("/~/") })) + .leptos_routes(&leptos_options, routes, { let leptos_options = leptos_options.clone(); move || shell(leptos_options.clone()) }) |