#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
|
||||
import React from 'react';
|
||||
import ButtonTransaction from 'component/common/transaction-link';
|
||||
import { remote } from 'electron';
|
||||
import moment from 'moment';
|
||||
|
||||
type Reward = {
|
||||
id: string,
|
||||
|
@ -17,6 +19,8 @@ type Props = {
|
|||
const RewardListClaimed = (props: Props) => {
|
||||
const { rewards } = props;
|
||||
|
||||
moment.locale(remote.app.getLocale());
|
||||
|
||||
if (!rewards || !rewards.length) {
|
||||
return null;
|
||||
}
|
||||
|
@ -35,14 +39,14 @@ const RewardListClaimed = (props: Props) => {
|
|||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{rewards.map(reward => (
|
||||
{rewards.reverse().map(reward => (
|
||||
<tr key={reward.id}>
|
||||
<td>{reward.reward_title}</td>
|
||||
<td>{reward.reward_amount}</td>
|
||||
<td>
|
||||
<ButtonTransaction id={reward.transaction_id} />
|
||||
</td>
|
||||
<td>{reward.created_at.replace('Z', ' ').replace('T', ' ')}</td>
|
||||
<td>{moment(reward.created_at).format('LLL')}</td>
|
||||
</tr>
|
||||
))}
|
||||
</tbody>
|
||||
|
|
Loading…
Reference in a new issue