From 31cd79c5432075f85ad2b72ac21f2cecf76d88e0 Mon Sep 17 00:00:00 2001 From: Adam Doyle Date: Mon, 9 Sep 2024 22:46:41 -0400 Subject: [PATCH] rm unused code --- client/src/components/chat.rs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) 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::