diff --git a/client/src/components/PromptInput/PromptInput.jsx b/client/src/components/PromptInput/PromptInput.jsx index 56191fe..0596ab3 100644 --- a/client/src/components/PromptInput/PromptInput.jsx +++ b/client/src/components/PromptInput/PromptInput.jsx @@ -10,6 +10,9 @@ export default function PromptInput() { const [error, setError] = useState(""); const dispatch = useDispatch(); + const handleInputChange = (e) => { + setInputValue(e.target.value); + }; const handleInputChange = (e) => { setInputValue(e.target.value); }; @@ -65,6 +68,10 @@ export default function PromptInput() { setInputValue(""); setError(""); }; + // Reset the input value and error state + setInputValue(""); + setError(""); + }; return (