Update api fetching
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Dominic Grimm 2022-08-02 11:29:17 +02:00
parent c8901a91c2
commit 0b7d26f150
1 changed files with 4 additions and 1 deletions

View File

@ -5,9 +5,12 @@
let listingIndex = 0;
function updateListingIndex(amount: number): void {
if (listingIndex == amount - 2) {
fetchData = api.fetchData();
}
if (listingIndex >= amount - 1) {
listingIndex = 0;
fetchData = api.fetchData();
} else {
listingIndex++;
}