Skip to content

Commit

Permalink
Merge pull request #130 from BU-Spark/someBugFixes
Browse files Browse the repository at this point in the history
testing wo ten
  • Loading branch information
raheeqi authored Nov 20, 2024
2 parents cb0e5c0 + 60f484e commit b037b89
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions frontend/src/pages/UploadPage/CSVUploadPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,13 @@ export const CSVUploadBox = () => {
},
});

const { data, loading, error, refetch: refetchLastTenUploads } = useQuery(LAST_TEN_UPLOADS_QUERY, {
variables: { userId: organization ? organization.id : user?.id },
skip: !isSignedIn,
onCompleted: (data) => {
console.log("Fetched data for last ten uploads:", data);
},
});
// const { data, loading, error, refetch: refetchLastTenUploads } = useQuery(LAST_TEN_UPLOADS_QUERY, {
// variables: { userId: organization ? organization.id : user?.id },
// skip: !isSignedIn,
// onCompleted: (data) => {
// console.log("Fetched data for last ten uploads:", data);
// },
// });


useSubscription(UPLOAD_STATUS_UPDATED_SUBSCRIPTION, {
Expand Down Expand Up @@ -143,11 +143,11 @@ export const CSVUploadBox = () => {



useEffect(() => {
if (data) {
setUpload(data.lastTenUploads);
}
}, [data]);
// useEffect(() => {
// if (data) {
// setUpload(data.lastTenUploads);
// }
// }, [data]);



Expand Down Expand Up @@ -347,7 +347,7 @@ export const CSVUploadBox = () => {
);

// Refetch the latest uploads from MongoDB after each successful upload
refetchLastTenUploads();
// refetchLastTenUploads();
}, 3000);
}
}, 500);
Expand Down

0 comments on commit b037b89

Please sign in to comment.