@griddo/cx 1.75.50 → 1.75.52
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -3
- package/src/utils/index.js +5 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@griddo/cx",
|
|
3
3
|
"description": "Griddo SSG based on Gatsby",
|
|
4
|
-
"version": "1.75.
|
|
4
|
+
"version": "1.75.52",
|
|
5
5
|
"authors": [
|
|
6
6
|
"Álvaro Sánchez' <alvaro.sanches@secuoyas.com>",
|
|
7
7
|
"Carlos Torres <carlos.torres@secuoyas.com>",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"react-helmet": "^6.0.0"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
|
-
"@griddo/eslint-config-back": "^1.75.
|
|
68
|
+
"@griddo/eslint-config-back": "^1.75.52",
|
|
69
69
|
"eslint": "^7.5.0",
|
|
70
70
|
"eslint-plugin-node": "^11.1.0",
|
|
71
71
|
"eslint-plugin-react": "7.14.3",
|
|
@@ -97,5 +97,5 @@
|
|
|
97
97
|
"publishConfig": {
|
|
98
98
|
"access": "public"
|
|
99
99
|
},
|
|
100
|
-
"gitHead": "
|
|
100
|
+
"gitHead": "1c84b53c8e1cae9fb36916bfe5e26d9a038afa77"
|
|
101
101
|
}
|
package/src/utils/index.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
const DEFAULT_ITEMS_PER_PAGE_FOR_LIST_TEMPLATES = 25;
|
|
2
|
+
|
|
1
3
|
const pageUtils = require('./pages.js');
|
|
2
4
|
|
|
3
5
|
const getPagePath = (site, fullPath) => `${site}${fullPath}`;
|
|
@@ -23,7 +25,9 @@ const getPageCluster = (itemsPerPage, items) => {
|
|
|
23
25
|
const getList = distributorTemplate => {
|
|
24
26
|
const allItems = distributorTemplate?.queriedItems;
|
|
25
27
|
// get itemsPerPage from templaet info
|
|
26
|
-
const itemsPerPage =
|
|
28
|
+
const itemsPerPage =
|
|
29
|
+
distributorTemplate?.itemsPerPage ||
|
|
30
|
+
DEFAULT_ITEMS_PER_PAGE_FOR_LIST_TEMPLATES;
|
|
27
31
|
// return an array of array pages
|
|
28
32
|
// [ [1, 2, 3], [4, 5, 6], [7, 8, 9] ]
|
|
29
33
|
// each array [1, 2, 3] represent a queriedItems
|