From 150cfe77587380c8fbdf9e40722397a0a10765d3 Mon Sep 17 00:00:00 2001 From: Tiago Rodrigues Date: Sun, 14 Oct 2018 13:32:01 -0300 Subject: [PATCH] #1772 - add Reverse Order & Use System/Location Time/Date --- src/renderer/component/rewardListClaimed/view.jsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/renderer/component/rewardListClaimed/view.jsx b/src/renderer/component/rewardListClaimed/view.jsx index 75268f250..3e0cb3213 100644 --- a/src/renderer/component/rewardListClaimed/view.jsx +++ b/src/renderer/component/rewardListClaimed/view.jsx @@ -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) => { - {rewards.map(reward => ( + {rewards.reverse().map(reward => ( {reward.reward_title} {reward.reward_amount} - {reward.created_at.replace('Z', ' ').replace('T', ' ')} + {moment(reward.created_at).format('LLL')} ))}