diff --git a/client/src/components/auth.rs b/client/src/components/auth.rs index f14069d..cc4123d 100644 --- a/client/src/components/auth.rs +++ b/client/src/components/auth.rs @@ -7,7 +7,7 @@ use serde_json::to_string; #[component] pub fn Auth() -> impl IntoView { let websocket = expect_context::(); - let (username, _set_username) = create_signal("Anonymous"); + let (username, set_username) = create_signal("Anonymous".to_string()); let username_input_ref = create_node_ref::(); let send_login = move |_| { @@ -17,6 +17,8 @@ pub fn Auth() -> impl IntoView { }) .unwrap(), ); + set_username.set(username_input_ref.get().unwrap().value()); + username_input_ref.get().unwrap().set_value(""); logging::log!("sent"); }; @@ -24,18 +26,22 @@ pub fn Auth() -> impl IntoView {

Sign in:

Username:

+
+
+
} } diff --git a/client/src/components/chat.rs b/client/src/components/chat.rs index 015d3a2..c0fcef9 100644 --- a/client/src/components/chat.rs +++ b/client/src/components/chat.rs @@ -84,18 +84,21 @@ pub fn Chat() -> impl IntoView {
+
+