tek-wallet 0.0.560 → 0.0.562

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.
@@ -128,7 +128,7 @@ function ActivitiesProvider(_a) {
128
128
  switch (_c.label) {
129
129
  case 0: return [4 /*yield*/, (0, get_activities_service_1.default)({
130
130
  page: 1,
131
- take: 0,
131
+ take: 1,
132
132
  })];
133
133
  case 1:
134
134
  response = _c.sent();
@@ -204,7 +204,7 @@ function ActivitiesProvider(_a) {
204
204
  });
205
205
  }); }, [isAuthenticated]);
206
206
  var loadActivities = (0, react_1.useCallback)(function (slug) { return __awaiter(_this, void 0, void 0, function () {
207
- var page, response, activitiesLoaded, newActivities;
207
+ var page, response, activitiesLoaded, newActivities, newPage;
208
208
  var _a, _b, _c, _d;
209
209
  return __generator(this, function (_e) {
210
210
  switch (_e.label) {
@@ -228,13 +228,14 @@ function ActivitiesProvider(_a) {
228
228
  return [2 /*return*/];
229
229
  }
230
230
  newActivities = __spreadArray(__spreadArray([], ((_d = activities === null || activities === void 0 ? void 0 : activities[slug]) !== null && _d !== void 0 ? _d : []), true), activitiesLoaded, true);
231
+ newPage = Math.floor(newActivities.length / const_1.ACTIVITIES_PAGE_SIZE);
231
232
  setActivities(function (prev) {
232
233
  var _a;
233
234
  return (__assign(__assign({}, prev), (_a = {}, _a[slug] = newActivities, _a)));
234
235
  });
235
236
  setPages(function (prev) {
236
237
  var _a;
237
- return (__assign(__assign({}, prev), (_a = {}, _a[slug] = page, _a)));
238
+ return (__assign(__assign({}, prev), (_a = {}, _a[slug] = newPage, _a)));
238
239
  });
239
240
  return [2 /*return*/];
240
241
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tek-wallet",
3
- "version": "0.0.560",
3
+ "version": "0.0.562",
4
4
  "description": "A custom React provider with TypeScript support",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",