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