From 04c36000db3c44b0a5284563a626e8eaeb388a26 Mon Sep 17 00:00:00 2001 From: u-e Date: Sun, 6 Jan 2019 22:33:31 +0300 Subject: [PATCH] updated a bit --- src/components/leaderBoard/view/leaderBoardView.js | 11 ++++++++--- src/components/upvote/view/upvoteView.js | 6 ++++-- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/components/leaderBoard/view/leaderBoardView.js b/src/components/leaderBoard/view/leaderBoardView.js index 66f476461..392a81111 100644 --- a/src/components/leaderBoard/view/leaderBoardView.js +++ b/src/components/leaderBoard/view/leaderBoardView.js @@ -1,5 +1,6 @@ import React, { PureComponent } from 'react'; import { View, FlatList, Text } from 'react-native'; +import { injectIntl } from 'react-intl'; // Constants @@ -35,11 +36,15 @@ class LeaderboardView extends PureComponent { }; render() { - const { users } = this.props; + const { users, intl } = this.props; return ( - Daily Top User + + {intl.formatMessage({ + id: 'notification.leaderboard_title', + })} + item.voter} @@ -51,4 +56,4 @@ class LeaderboardView extends PureComponent { } } -export default LeaderboardView; +export default injectIntl(LeaderboardView); diff --git a/src/components/upvote/view/upvoteView.js b/src/components/upvote/view/upvoteView.js index c52d92801..5df968647 100644 --- a/src/components/upvote/view/upvoteView.js +++ b/src/components/upvote/view/upvoteView.js @@ -134,6 +134,8 @@ class UpvoteView extends Component { const _percent = `${(sliderValue * 100).toFixed(0)}%`; const _amount = `$${amount}`; + const _totalPayout = totalPayout ? totalPayout : '0.000'; + return ( {({ @@ -167,8 +169,8 @@ class UpvoteView extends Component { name={iconName} /> )} - {isShowPayoutValue && totalPayout && ( - {`$${totalPayout}`} + {isShowPayoutValue && ( + {`$${_totalPayout}`} )}