From b856f12cf422b96c37c12df3d7829e4d15ef4453 Mon Sep 17 00:00:00 2001 From: tempest Date: Tue, 15 Apr 2025 00:08:12 -0600 Subject: Can find content data --- src/main.rs | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'src/main.rs') 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()) }) -- cgit 1.4.1