diff --git a/client/src/components/chat.rs b/client/src/components/chat.rs index f3ce095..cc7efc5 100644 --- a/client/src/components/chat.rs +++ b/client/src/components/chat.rs @@ -1,9 +1,5 @@ use crate::components::websocket::WebSocketContext; -use leptos::{ - ev, - html::{Input, Textarea}, - prelude::*, -}; +use leptos::{ev, html::Textarea, prelude::*}; use leptos_use::core::ConnectionReadyState; use lib::*; use serde_json::to_string; @@ -14,14 +10,12 @@ pub fn Chat() -> impl IntoView { let websocket = expect_context::(); let chat_context = expect_context::>>(); let chat_update_context = expect_context::>>(); - let connected = move || websocket.ready_state.get() == ConnectionReadyState::Open; // Chat stuff let chat_history = RwSignal::>::new(vec![]); let users = RwSignal::>::new(vec![]); let chat_name = RwSignal::::new("".to_string()); let chat_input = RwSignal::new(String::new()); - let chat_input_ref = NodeRef::::new(); let chat_history_ref = NodeRef::