23 lines
581 B
Rust
23 lines
581 B
Rust
use lan_party_core::event::EventSpec;
|
|
use log::debug;
|
|
use sycamore::prelude::*;
|
|
|
|
use crate::components::{
|
|
event::{Edit, EditProps},
|
|
Block, Button, Page,
|
|
};
|
|
|
|
#[component]
|
|
pub fn EventsPage<'a, G: Html>(cx: Scope<'a>) -> View<G> {
|
|
let event_spec = create_signal(cx, EventSpec::default());
|
|
|
|
view! { cx,
|
|
Page {
|
|
Block(title="Create new event".into()) {
|
|
EventSpec::edit(EditProps { state: event_spec })
|
|
Button(icon="mdi-check".into(), onclick=move |_| debug!("{:#?}", event_spec.get()))
|
|
}
|
|
}
|
|
}
|
|
}
|