feat: switch Dioxus to fullstack, add a form for creating a project
This commit is contained in:
18
src/components/home.rs
Normal file
18
src/components/home.rs
Normal 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;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user