use crate::components::websocket::WebSocketContext; use html::{Input, Textarea}; use leptos::*; use leptos_use::core::ConnectionReadyState; use lib::models::*; use serde_json::to_string; #[component] pub fn Chat() -> impl IntoView { let websocket = expect_context::(); let chat_context = expect_context::>>(); let chat_update_context = expect_context::>>(); // Chat stuff let (chat_history, set_chat_history) = create_signal::>(vec![]); let (users, set_users) = create_signal::>(vec![]); let (chat_name, set_chat_name) = create_signal::("".to_string()); let chat_history_ref = create_node_ref::

    Users: {move || users().len()}

    {move || users().into_iter().map(|n| view! {
  • {n}
  • }).collect_view()}

handle empty

} }