Skip to content

Commit

Permalink
fix(follow-up): fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
MahtabBukhari committed Jul 18, 2024
1 parent 0ffde17 commit 9bd9d4f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/App/UniverseQuestion/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ export const UniverseQuestion = () => {
await fetchData(setBudget, setAbortRequests, questionToSubmit)
}

const canSubmit = true
const canSubmit = !!question.trim().length

const onEnterPress = async (e: React.KeyboardEvent) => {
if (e.keyCode === 13 && e.shiftKey === false && canSubmit && question.trim().length > 0) {
if (e.keyCode === 13 && e.shiftKey === false && canSubmit) {
e.preventDefault()
handleSubmitQuestion(question)
}
Expand Down

0 comments on commit 9bd9d4f

Please sign in to comment.