Some minor restructuring and improvements

This commit is contained in:
Lol3rrr
2024-09-08 00:41:12 +02:00
parent ae6c1b590f
commit 828df3290a
17 changed files with 387 additions and 106 deletions

17
frontend/src/demo.rs Normal file
View File

@@ -0,0 +1,17 @@
use leptos::*;
#[leptos::component]
pub fn demo() -> impl leptos::IntoView {
let params = leptos_router::use_params_map();
let id = move || params.with(|params| params.get("id").cloned().unwrap_or_default());
let demo_info = create_resource(|| (), move |_| async move {
let res = reqwasm::http::Request::get(&format!("/api/demos/{}/info", id())).send().await.unwrap();
dbg!(res.text().await);
0
});
view! {
<h2>Demo - {id}</h2>
}
}