diff --git a/src/app.rs b/src/app.rs index 82836ba..8edd2f8 100644 --- a/src/app.rs +++ b/src/app.rs @@ -1,16 +1,13 @@ use leptos::*; -use leptos_meta::*; -use leptos_router::*; use crate::components::{item_form::ItemForm, items_list::ItemsList}; use crate::models::item::Item; -use std::sync::Arc; #[component] pub fn App() -> impl IntoView { - let items = create_signal(Vec::::new()); + let (items_signal, set_items) = create_signal(Vec::::new()); let add_item = move |name: String, description: String, tags: Vec<(String, String)>| { - items.update(|items| { + set_items;(|mut items: Vec| { items.push(Item { id: uuid::Uuid::new_v4().to_string(), name, @@ -23,8 +20,8 @@ pub fn App() -> impl IntoView { view! {

CompareWare

- - + +
} } \ No newline at end of file