diff --git a/src/common/pages/Wallet/index.js b/src/common/pages/Wallet/index.js
index 1b9b1a1..d3c3b42 100644
--- a/src/common/pages/Wallet/index.js
+++ b/src/common/pages/Wallet/index.js
@@ -53,6 +53,7 @@ export default class WalletComponent extends React.Component {
}
componentDidMount() {
+ this.props.appstate.transaction.getAll();
this.purchasedItemStore.getAll().then(res => {
console.log(res, 'ini purchased items')
})
@@ -74,38 +75,39 @@ export default class WalletComponent extends React.Component {
const voucher = ;
const points = ;
- const data = [
- {
- id: faker.random.uuid(),
- created_at: faker.date.past(),
- type: 'Points',
- amount: faker.commerce.price()
- },
- {
- id: faker.random.uuid(),
- created_at: faker.date.past(),
- type: 'Points',
- amount: faker.commerce.price()
- },
- {
- id: faker.random.uuid(),
- created_at: faker.date.past(),
- type: 'Voucher',
- amount: faker.commerce.price()
- },
- {
- id: faker.random.uuid(),
- created_at: faker.date.past(),
- type: 'Voucher',
- amount: faker.commerce.price()
- },
- {
- id: faker.random.uuid(),
- created_at: faker.date.past(),
- type: 'Points',
- amount: faker.commerce.price()
- },
- ];
+ // const data = [
+ // {
+ // id: faker.random.uuid(),
+ // created_at: faker.date.past(),
+ // type: 'Points',
+ // amount: faker.commerce.price()
+ // },
+ // {
+ // id: faker.random.uuid(),
+ // created_at: faker.date.past(),
+ // type: 'Points',
+ // amount: faker.commerce.price()
+ // },
+ // {
+ // id: faker.random.uuid(),
+ // created_at: faker.date.past(),
+ // type: 'Voucher',
+ // amount: faker.commerce.price()
+ // },
+ // {
+ // id: faker.random.uuid(),
+ // created_at: faker.date.past(),
+ // type: 'Voucher',
+ // amount: faker.commerce.price()
+ // },
+ // {
+ // id: faker.random.uuid(),
+ // created_at: faker.date.past(),
+ // type: 'Points',
+ // amount: faker.commerce.price()
+ // },
+ // ];
+ const data = this.props.appstate.transaction.list;
const columns = [{
title: 'Id',
diff --git a/src/common/stores/transaction.js b/src/common/stores/transaction.js
index c943449..8cea6ab 100644
--- a/src/common/stores/transaction.js
+++ b/src/common/stores/transaction.js
@@ -98,7 +98,7 @@ export default class Transaction {
};
}
- // @action
+ // @action
// getAll() {
// this.isLoading = true;
// return this.http.get("transaction")
@@ -111,7 +111,7 @@ export default class Transaction {
@action
getAll() {
this.isLoading = true;
- return this.http.get("transaction")
+ return this.http.get("transactions")
.then(res => {
this.list = res;
this.isLoading = false;