chore: Fix linter issue by adjusting onKeyDown logic formatting to Prettier standard
- Refactored condition in `onKeyDown` function for better readability. - Resolved Prettier lint error by adding line breaks and proper indentation.
This commit is contained in:
parent
3272c30b20
commit
6efdb74027
@ -225,7 +225,11 @@ const RichTextEditor = ({
|
||||
|
||||
const handleKeyDown = useCallback(
|
||||
(event: React.KeyboardEvent) => {
|
||||
if (event.key === 'Enter' && !event.shiftKey && event.nativeEvent.isComposing === false) {
|
||||
if (
|
||||
event.key === 'Enter' &&
|
||||
!event.shiftKey &&
|
||||
event.nativeEvent.isComposing === false
|
||||
) {
|
||||
event.preventDefault()
|
||||
if (messages[messages.length - 1]?.status !== MessageStatus.Pending) {
|
||||
sendChatMessage(currentPrompt)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user