Renames nextCollectionsPage variable for better clarity.
This commit is contained in:
parent
771b284ae5
commit
3b6284c833
|
@ -13,7 +13,7 @@ const useTainacanStore = defineStore("tainacan", {
|
||||||
totalCollections: 0,
|
totalCollections: 0,
|
||||||
collectionItems: [],
|
collectionItems: [],
|
||||||
totalCollectionItems: 0,
|
totalCollectionItems: 0,
|
||||||
nextCollectionsPage: 1,
|
nextItemsByCollectionPage: 1,
|
||||||
items: [],
|
items: [],
|
||||||
nextItemsPage: 1,
|
nextItemsPage: 1,
|
||||||
totalItems: 0,
|
totalItems: 0,
|
||||||
|
@ -88,10 +88,10 @@ const useTainacanStore = defineStore("tainacan", {
|
||||||
|
|
||||||
if (params.reset) {
|
if (params.reset) {
|
||||||
this.collectionItems = [];
|
this.collectionItems = [];
|
||||||
this.nextCollectionsPage = 1;
|
this.nextItemsByCollectionPage = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
endpoint += '&paged=' + this.nextCollectionsPage;
|
endpoint += '&paged=' + this.nextItemsByCollectionPage;
|
||||||
|
|
||||||
const response = await axios.get(endpoint);
|
const response = await axios.get(endpoint);
|
||||||
|
|
||||||
|
@ -102,13 +102,13 @@ const useTainacanStore = defineStore("tainacan", {
|
||||||
this.totalCollectionItems === "0") {
|
this.totalCollectionItems === "0") {
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
this.nextCollectionsPage++;
|
this.nextItemsByCollectionPage++;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
this.collectionItems = [];
|
this.collectionItems = [];
|
||||||
this.totalCollectionItems = 0;
|
this.totalCollectionItems = 0;
|
||||||
this.nextCollectionsPage = 1;
|
this.nextItemsByCollectionPage = 1;
|
||||||
console.error("Erro no carregamento dos items da coleção:", err);
|
console.error("Erro no carregamento dos items da coleção:", err);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in New Issue