Skip to content

Commit

Permalink
clear input on send
Browse files Browse the repository at this point in the history
  • Loading branch information
lalalune committed Oct 14, 2024
1 parent 8218ee6 commit f9288e2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,9 @@ const App = () => {
const handleSubmit = useCallback(
async (e: React.FormEvent<HTMLFormElement>) => {
e.preventDefault()
await processInput(inputText)
const input = inputText.trim()
setInputText('')
await processInput(input)
},
[inputText, processInput]
)
Expand Down

0 comments on commit f9288e2

Please sign in to comment.