File tree Expand file tree Collapse file tree 1 file changed +0
-3
lines changed
src/components/side-panel Expand file tree Collapse file tree 1 file changed +0
-3
lines changed Original file line number Diff line number Diff line change @@ -64,13 +64,11 @@ export default function SidePanel() {
64
64
} ;
65
65
} , [ client , log ] ) ;
66
66
67
- // Helper function to check if input is valid (not empty and not just whitespace)
68
67
const isValidInput = ( input : string ) : boolean => {
69
68
return input . trim ( ) . length > 0 ;
70
69
} ;
71
70
72
71
const handleSubmit = ( ) => {
73
- // Only send if the input is valid
74
72
if ( isValidInput ( textInput ) ) {
75
73
client . send ( [ { text : textInput } ] ) ;
76
74
@@ -143,7 +141,6 @@ export default function SidePanel() {
143
141
if ( e . key === "Enter" && ! e . shiftKey ) {
144
142
e . preventDefault ( ) ;
145
143
e . stopPropagation ( ) ;
146
- // Only submit if input is valid
147
144
if ( isValidInput ( textInput ) ) {
148
145
handleSubmit ( ) ;
149
146
}
You can’t perform that action at this time.
0 commit comments