Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

testing wo ten #130

Merged
merged 1 commit into from
Nov 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading