Skip to content

Commit e944c9e

Browse files
Merge pull request #21 from abhitrueprogrammer/staging
Fixes
2 parents f4693a8 + ae112ef commit e944c9e

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/app/upload/page.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ const Page = () => {
3838
const [exam, setExam] = useState("");
3939
const [year, setYear] = useState("");
4040
const [files, setFiles] = useState<File[]>([]);
41+
const [inputValue, setInputValue] = useState('')
42+
4143
const [isSubjectCommandOpen, setIsSubjectCommandOpen] = useState(false);
4244
// const toggleOpenCamera = () => {
4345
// setOpenCamera((prev) => !prev);
@@ -92,7 +94,7 @@ const Page = () => {
9294
);
9395
return response.data;
9496
} catch (error) {
95-
handleAPIError(error);
97+
throw handleAPIError(error);
9698
}
9799
})(),
98100
{
@@ -193,7 +195,10 @@ const Page = () => {
193195
)}
194196
</div> */}
195197
<Command className="rounded-lg border shadow-md md:min-w-[450px]">
196-
<CommandInput placeholder="Type a subject or search..." />
198+
<CommandInput
199+
value={inputValue}
200+
onChangeCapture={(e) => setInputValue((e.target as HTMLInputElement).value)}
201+
placeholder="Type a subject or search..." />
197202
<CommandList className="h-[100px]">
198203
<CommandEmpty>No results found.</CommandEmpty>
199204

0 commit comments

Comments
 (0)