feat: fix paging data
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { makeAutoObservable } from "mobx";
|
||||
import { http } from "../utils/http";
|
||||
import {makeAutoObservable} from "mobx";
|
||||
import {http} from "../utils/http";
|
||||
|
||||
export class Payback {
|
||||
page = 0;
|
||||
@@ -36,7 +36,7 @@ export class Payback {
|
||||
return item;
|
||||
}) ?? [];
|
||||
|
||||
this.total_data = response.body.total_data ?? 0;
|
||||
this.total_data = response?.body?.count ?? 0;
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
@@ -54,7 +54,7 @@ export class Payback {
|
||||
return item;
|
||||
}) ?? [];
|
||||
|
||||
this.total_data = response.body.total_data ?? 0;
|
||||
this.total_data = response?.body?.count ?? 0;
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user