diff --git a/src/app/upload/page.tsx b/src/app/upload/page.tsx index 65750cb..abf977b 100644 --- a/src/app/upload/page.tsx +++ b/src/app/upload/page.tsx @@ -39,6 +39,8 @@ const Page = () => { const [exam, setExam] = useState(""); const [year, setYear] = useState(""); const [files, setFiles] = useState([]); + const [inputValue, setInputValue] = useState('') + const [isSubjectCommandOpen, setIsSubjectCommandOpen] = useState(false); // const toggleOpenCamera = () => { // setOpenCamera((prev) => !prev); @@ -112,6 +114,7 @@ const Page = () => { const handleSubjectSelect = (value: string) => { setSubject(value); + setInputValue(value) setIsSubjectCommandOpen(false); }; @@ -191,7 +194,10 @@ const Page = () => { )} */} - + setInputValue((e.target as HTMLInputElement).value)} + placeholder="Type a subject or search..." /> No results found.