use leptos::{IntoView, component, view}; use crate::{ api::products_registered_wrapped, components::{async_fetch::AsyncFetch, container::Container, icon_p::IconP}, }; #[component] pub fn ProductOverview() -> impl IntoView { view! { }, "products"), ( view! { }, "create-product", ), ( view! { }, "associate-barcode-product", ), ] > { AsyncFetch! { @map_error_in_producer fetcher = products_registered_wrapped(), producer = |products| { view! {

{format!("You have {} products.", products.len())}

} } } }
} }