diff --git a/components/prompt-form.tsx b/components/prompt-form.tsx index 75258c8..8d36838 100644 --- a/components/prompt-form.tsx +++ b/components/prompt-form.tsx @@ -15,7 +15,7 @@ import { IconArrowElbow, IconPlus } from '@/components/ui/icons' export interface PromptProps extends Pick { - onSubmit: (value: string) => void + onSubmit: (value: string) => Promise isLoading: boolean } @@ -38,7 +38,7 @@ export function PromptForm({
{ e.preventDefault() - if (input === '') { + if (!input?.trim()) { return } setInput('')