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

Include projects after the 5 page cutoff #3

Open
AlecBlance opened this issue Nov 28, 2023 · 1 comment
Open

Include projects after the 5 page cutoff #3

AlecBlance opened this issue Nov 28, 2023 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@AlecBlance
Copy link
Owner

Alpas has a 5-page limit cut off in filtering projects. I explicitly did that since after 5 pages with no figma prototypes, there aren't much projects with it but there are still some. My goal is to include these projects while avoiding infinite loading and empty projects array returned from fetchProjects server action.

@AlecBlance AlecBlance added the enhancement New feature or request label Nov 28, 2023
@AlecBlance AlecBlance self-assigned this Nov 28, 2023
@AlecBlance
Copy link
Owner Author

AlecBlance commented Nov 28, 2023

These lines of code stops the whole search because it sets the hasNextPage to false.

if (pages == 5 && projects.length == previousProjectsLength) {
hasNextPage = false;
break;
}

I've been thinking it might be good to create a popup that notifies that the succeeding search will introduce delay. It temporarily mitigates infinite loading and empty arrays.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant