use leptos::{
IntoView, component,
prelude::{ElementChild, Get, IntoAny},
view,
};
use leptos_router::hooks::use_params_map;
use rocie_client::models::product;
use crate::{
api::product_by_name_wrapped,
components::{
async_fetch::{AsyncFetch, AsyncResource},
catch_errors::CatchErrors,
login_wall::LoginWall,
site_header::SiteHeader,
},
};
#[component]
pub fn Product() -> impl IntoView {
let name = || {
use_params_map()
.get()
.get("name")
.expect("Should always have a name, because the router would otherwise not match")
};
view! {