Added timeago + correct refresh of the account page after transaction
This commit is contained in:
@@ -66,6 +66,7 @@
|
||||
"react-router-bootstrap": "^0.20.1",
|
||||
"react-router-redux": "^3.0.0",
|
||||
"react-select": "^0.9.1",
|
||||
"react-timeago": "^2.2.1",
|
||||
"redux": "^3.0.2",
|
||||
"redux-batched-subscribe": "^0.1.4",
|
||||
"redux-logger": "^2.6.0",
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
import React from "react";
|
||||
import Spinner from "react-loader";
|
||||
import * as BS from "react-bootstrap";
|
||||
|
||||
import TimeAgo from 'react-timeago';
|
||||
|
||||
import { Money } from './Money';
|
||||
import AccountInfo from './AccountInfo';
|
||||
@@ -29,7 +29,7 @@ export class TransfersTable extends React.Component {
|
||||
date = null,
|
||||
status = ''
|
||||
}, idx) => (<tr key={idx}>
|
||||
<td>{ date || 'N/a'}</td>
|
||||
<td><TimeAgo date={date} /></td>
|
||||
<td><AccountInfo accountId={ fromAccountId } /></td>
|
||||
<td><AccountInfo accountId={ toAccountId } /></td>
|
||||
<td><Money amount={ amount } /></td>
|
||||
|
||||
@@ -74,7 +74,9 @@ export class Account extends React.Component {
|
||||
const { accountId } = params;
|
||||
dispatch(A.makeTransfer(accountId, transfer.form ))
|
||||
.then(() => {
|
||||
this.loadAccountInfo();
|
||||
setTimeout(() => {
|
||||
this.loadAccountInfo();
|
||||
}, 500);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user