rm unused code

This commit is contained in:
Adam 2024-09-09 22:46:41 -04:00
parent 0729ffc077
commit 31cd79c543

View file

@ -1,9 +1,5 @@
use crate::components::websocket::WebSocketContext; use crate::components::websocket::WebSocketContext;
use leptos::{ use leptos::{ev, html::Textarea, prelude::*};
ev,
html::{Input, Textarea},
prelude::*,
};
use leptos_use::core::ConnectionReadyState; use leptos_use::core::ConnectionReadyState;
use lib::*; use lib::*;
use serde_json::to_string; use serde_json::to_string;
@ -14,14 +10,12 @@ pub fn Chat() -> impl IntoView {
let websocket = expect_context::<WebSocketContext>(); let websocket = expect_context::<WebSocketContext>();
let chat_context = expect_context::<ReadSignal<Option<ChatMessage>>>(); let chat_context = expect_context::<ReadSignal<Option<ChatMessage>>>();
let chat_update_context = expect_context::<ReadSignal<Option<ChatUpdate>>>(); let chat_update_context = expect_context::<ReadSignal<Option<ChatUpdate>>>();
let connected = move || websocket.ready_state.get() == ConnectionReadyState::Open;
// Chat stuff // Chat stuff
let chat_history = RwSignal::<Vec<String>>::new(vec![]); let chat_history = RwSignal::<Vec<String>>::new(vec![]);
let users = RwSignal::<Vec<String>>::new(vec![]); let users = RwSignal::<Vec<String>>::new(vec![]);
let chat_name = RwSignal::<String>::new("".to_string()); let chat_name = RwSignal::<String>::new("".to_string());
let chat_input = RwSignal::new(String::new()); let chat_input = RwSignal::new(String::new());
let chat_input_ref = NodeRef::<Input>::new();
let chat_history_ref = NodeRef::<Textarea>::new(); let chat_history_ref = NodeRef::<Textarea>::new();
// Connection status updates in chat window // Connection status updates in chat window