Skip to content

Commit

Permalink
fix: async :dead:
Browse files Browse the repository at this point in the history
  • Loading branch information
harshkhandeparkar committed Jun 29, 2024
1 parent 2d6b77e commit 17cfa5e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions frontend/src/pages/UploadPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,8 @@ const UploadPage: Component = () => {
if (!awaitingResponse()) {
try {
const formData = new FormData();
qPapers().forEach(async (qp) => {

for (const qp of qPapers()) {
const {
file,
course_code,
Expand All @@ -150,7 +151,8 @@ const UploadPage: Component = () => {
file_name,
`${course_code}_${course_name}_${year}_${exam}_${semester}`
);
});
}

toast(`Uploading ${qPapers().length} file${qPapers().length > 1 ? 's' : ''}.`);

setAwaitingResponse(true);
Expand Down

0 comments on commit 17cfa5e

Please sign in to comment.