add enter support
This commit is contained in:
@@ -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' }}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user