feat: switch Dioxus to fullstack, add a form for creating a project

This commit is contained in:
2024-08-17 00:30:17 +02:00
parent 283b3965db
commit 57705de44d
13 changed files with 944 additions and 50 deletions

18
src/components/home.rs Normal file
View File

@@ -0,0 +1,18 @@
use crate::components::form_project::FormProject;
use crate::server::projects::create_project;
use dioxus::core_macro::rsx;
use dioxus::dioxus_core::Element;
use dioxus::prelude::*;
#[component]
pub(crate) fn Home() -> Element {
rsx! {
FormProject {
onsubmit: move |title| {
spawn(async move {
let _ = create_project(title).await;
});
}
}
}
}