Skip to content

Commit

Permalink
Update envman to work with latest leptos.
Browse files Browse the repository at this point in the history
  • Loading branch information
azriel91 committed Jan 28, 2024
1 parent 4f75da0 commit 4db241a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion examples/envman/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ tracing = { version = "0.1.40", optional = true }

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
clap = { version = "4.4.18", features = ["derive"], optional = true }
tokio = { version = "1.35.1", features = ["rt", "rt-multi-thread"], optional = true }
tokio = { version = "1.35.1", features = ["rt", "rt-multi-thread", "signal"], optional = true }

[target.'cfg(target_arch = "wasm32")'.dependencies]
console_error_panic_hook = "0.1.7"
Expand Down
11 changes: 6 additions & 5 deletions examples/envman/src/web/components/flow_graph.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use leptos::{
component, create_signal, view, IntoView, ServerFnError, SignalGet, SignalUpdate, Transition,
component, create_signal, server_fn::error::NoCustomError, view, IntoView, ServerFnError,
SignalGet, SignalUpdate, Transition,
};

/// Renders the flow graph.
Expand Down Expand Up @@ -77,11 +78,11 @@ pub fn FlowGraph() -> impl IntoView {
}

#[leptos::server(FlowGraphSrc, "/flow_graph")]
pub async fn flow_graph_src() -> Result<String, ServerFnError> {
pub async fn flow_graph_src() -> Result<String, ServerFnError<NoCustomError>> {
use crate::{flows::AppUploadFlow, web::FlowDotRenderer};
let flow = AppUploadFlow::flow()
.await
.map_err(|envman_error| ServerFnError::ServerError(format!("{}", envman_error)))?;
let flow = AppUploadFlow::flow().await.map_err(|envman_error| {
ServerFnError::<NoCustomError>::ServerError(format!("{}", envman_error))
})?;

// use peace::rt_model::fn_graph::daggy::petgraph::dot::{Config, Dot};
// let dot_source = Dot::with_config(cx.props.flow.graph().graph(),
Expand Down

0 comments on commit 4db241a

Please sign in to comment.