Fixed Empty Spaces Passed in the Input Field

This commit is contained in:
Arnab Ghosh
2023-10-04 20:54:25 +05:30
parent b7d569de98
commit e95e084956

View File

@@ -61,6 +61,8 @@ export default function Conversation() {
};
const handleQuestion = (question: string) => {
question = question.trim();
if (question === '') return;
dispatch(addQuery({ prompt: question }));
dispatch(fetchAnswer({ question }));
};