revert: buggy pagination
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2023-05-04 14:32:37 +02:00
parent 53e3ddb751
commit b2648645e8
4 changed files with 28 additions and 75 deletions

View File

@@ -167,27 +167,13 @@
}
onMount(async () => {
let page = 0;
let pagesize = 100;
while (page >= 0) {
const donations = await DonationService.donationControllerGetAll(
page,
pagesize
);
if (donations.length == 0) {
page = -2;
}
current_donations = current_donations.concat(...donations);
options.update((options) => ({
...options,
data: current_donations,
}));
dataLoaded = true;
page++;
pagesize += 100;
}
const donations = await DonationService.donationControllerGetAll();
current_donations = donations;
options.update((options) => ({
...options,
data: current_donations,
}));
dataLoaded = true;
});
</script>