add enter support

This commit is contained in:
Pritimay Sarkar
2024-02-29 22:21:38 +05:30
parent 565cb2259a
commit 048bfcd0cb

View File

@@ -204,11 +204,11 @@ function Gemini(props) {
type="text"
value={newMessage}
onChange={(e) => setNewMessage(e.target.value)}
// onKeyDown={(e) => {
// if (e.key === 'Enter') {
// handleSendMessage();
// }
// }}
onKeyDown={(e) => {
if (e.key === 'Enter') {
handleSendMessage();
}
}}
placeholder="Type your message..."
style={{ marginRight: '8px', padding: '8px', fontSize: '16px', width: '50vw' }}
/>