From b09c0a1d69e392c3c75796b7d2a012dbe43c3ec4 Mon Sep 17 00:00:00 2001 From: Sahitya Kumar Choubey Date: Mon, 3 Jun 2024 23:13:02 +0530 Subject: [PATCH] disable button on empty message --- frontend/src/app/chat/page.tsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/frontend/src/app/chat/page.tsx b/frontend/src/app/chat/page.tsx index 7cddc62..2813958 100644 --- a/frontend/src/app/chat/page.tsx +++ b/frontend/src/app/chat/page.tsx @@ -324,6 +324,8 @@ function ChatpageInner() { setChatState("idle"); }; + const [inputValue, setInputValue] = useState(""); + return (
setMessage(e.target.value)} + onChange={(e) => { + setMessage(e.target.value); + setInputValue(e.target.value); + }} /> {/* */}