Skip to content

Commit 6ba499f

Browse files
fix: Previously recorded question reappears if clicked on mic repeatedly. (#1205)
1 parent 3b5b1b1 commit 6ba499f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

code/frontend/src/pages/chat/Chat.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,9 @@ const Chat = () => {
188188
};
189189

190190
const onMicrophoneClick = async () => {
191+
// clear the previous text
192+
setUserMessage("");
193+
setRecognizedText("");
191194
if (!isRecognizing) {
192195
setSendButtonDisabled(true);
193196
await startSpeechRecognition();

0 commit comments

Comments
 (0)