#1772 - add Reverse Order & Use System/Location Time/Date
This commit is contained in:
parent
be7fb04c99
commit
150cfe7758
1 changed files with 6 additions and 2 deletions
|
@ -1,6 +1,8 @@
|
||||||
// @flow
|
// @flow
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import ButtonTransaction from 'component/common/transaction-link';
|
import ButtonTransaction from 'component/common/transaction-link';
|
||||||
|
import { remote } from 'electron';
|
||||||
|
import moment from 'moment';
|
||||||
|
|
||||||
type Reward = {
|
type Reward = {
|
||||||
id: string,
|
id: string,
|
||||||
|
@ -17,6 +19,8 @@ type Props = {
|
||||||
const RewardListClaimed = (props: Props) => {
|
const RewardListClaimed = (props: Props) => {
|
||||||
const { rewards } = props;
|
const { rewards } = props;
|
||||||
|
|
||||||
|
moment.locale(remote.app.getLocale());
|
||||||
|
|
||||||
if (!rewards || !rewards.length) {
|
if (!rewards || !rewards.length) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -35,14 +39,14 @@ const RewardListClaimed = (props: Props) => {
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{rewards.map(reward => (
|
{rewards.reverse().map(reward => (
|
||||||
<tr key={reward.id}>
|
<tr key={reward.id}>
|
||||||
<td>{reward.reward_title}</td>
|
<td>{reward.reward_title}</td>
|
||||||
<td>{reward.reward_amount}</td>
|
<td>{reward.reward_amount}</td>
|
||||||
<td>
|
<td>
|
||||||
<ButtonTransaction id={reward.transaction_id} />
|
<ButtonTransaction id={reward.transaction_id} />
|
||||||
</td>
|
</td>
|
||||||
<td>{reward.created_at.replace('Z', ' ').replace('T', ' ')}</td>
|
<td>{moment(reward.created_at).format('LLL')}</td>
|
||||||
</tr>
|
</tr>
|
||||||
))}
|
))}
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|
Loading…
Reference in a new issue