@everymatrix/casino-games-category-section 0.0.359 → 0.0.360
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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@everymatrix/casino-games-category-section",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.360",
|
|
4
4
|
"main": "dist/casino-games-category-section.js",
|
|
5
5
|
"svelte": "src/index.ts",
|
|
6
6
|
"scripts": {
|
|
@@ -36,5 +36,5 @@
|
|
|
36
36
|
"publishConfig": {
|
|
37
37
|
"access": "public"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "bc9e5f5d2238b8300f8d4cb70890b2c1f0414b21"
|
|
40
40
|
}
|
|
@@ -206,21 +206,31 @@
|
|
|
206
206
|
}
|
|
207
207
|
}
|
|
208
208
|
|
|
209
|
-
|
|
209
|
+
const sessionData = JSON.parse(sessionStorage.getItem(categoryId));
|
|
210
|
+
|
|
211
|
+
if(sessionData){
|
|
212
|
+
isLoading = false;
|
|
213
|
+
|
|
214
|
+
resolve(sessionData);
|
|
215
|
+
} else {
|
|
216
|
+
fetch(url)
|
|
210
217
|
.then((res:any) => res.json())
|
|
211
|
-
.then((
|
|
218
|
+
.then((categoryData:any) => {
|
|
212
219
|
dataloaded = true
|
|
213
220
|
hasErrors = false;
|
|
214
|
-
maxTotal =
|
|
221
|
+
maxTotal = categoryData.games.total;
|
|
222
|
+
|
|
223
|
+
sessionStorage.setItem(categoryId, JSON.stringify(categoryData));
|
|
215
224
|
|
|
216
|
-
resolve(
|
|
225
|
+
resolve(categoryData);
|
|
217
226
|
}, (err:any) => {
|
|
218
227
|
hasErrors = true;
|
|
219
|
-
|
|
228
|
+
|
|
220
229
|
console.error(err);
|
|
221
|
-
|
|
230
|
+
|
|
222
231
|
reject(err);
|
|
223
232
|
});
|
|
233
|
+
}
|
|
224
234
|
});
|
|
225
235
|
}
|
|
226
236
|
|