diff --git a/src/app.rs b/src/app.rs index e9dc2784..93d3102d 100644 --- a/src/app.rs +++ b/src/app.rs @@ -1,4 +1,4 @@ -use crate::thing::{read_things, ReadThings, Thing}; +use crate::nix; use cfg_if::cfg_if; #[cfg(feature = "ssr")] use http::status::StatusCode; @@ -32,40 +32,20 @@ pub fn App(cx: Scope) -> impl IntoView { #[component] fn Home(cx: Scope) -> impl IntoView { - let thing = Thing::new("Hello from frontend".to_string()); - let things = create_local_resource(cx, move || (), move |_| read_things()); view! { cx,
"This value ⤵️ is generated in-browser:"
-{thing.browser_view()}-
fn_url: {ReadThings::url()}- {move || { - things.read(cx) - .map(move |things| { - log!("things: {:?}", things); - match things { - Err(e) => { - view! { cx,
"Server Error: " {e.to_string()}}.into_view(cx) - } - Ok(things) => { - things.into_iter().map(move |thing| { - view! { - cx, -
++ {format!("{data:?}")} + +