Skip to content

Commit

Permalink
fix: 💫 application error
Browse files Browse the repository at this point in the history
- due to the long response time
  • Loading branch information
AlecBlance committed Nov 28, 2023
1 parent 02785e1 commit b04d62c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/actions/fetch-projects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const fetchProjects = async (
let projects: Project[] = [];
let previousProjectsLength = 0;
let pages = 0;
let startTime = Date.now();

const getProjects = async () => {
const variables: Variables = {
Expand Down Expand Up @@ -83,7 +84,7 @@ const fetchProjects = async (
hasNextPage = false;
break;
}
} while (hasNextPage && projects.length < 20);
} while (hasNextPage && Date.now() - startTime < 9000);
return {
hasNextPage,
after,
Expand Down

0 comments on commit b04d62c

Please sign in to comment.