updated a bit

This commit is contained in:
u-e 2019-01-06 22:33:31 +03:00
parent 9a29783fa1
commit 04c36000db
2 changed files with 12 additions and 5 deletions

View File

@ -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 (
<View style={styles.container}>
<Text style={styles.text}>Daily Top User</Text>
<Text style={styles.text}>
{intl.formatMessage({
id: 'notification.leaderboard_title',
})}
</Text>
<FlatList
data={users}
keyExtractor={item => item.voter}
@ -51,4 +56,4 @@ class LeaderboardView extends PureComponent {
}
}
export default LeaderboardView;
export default injectIntl(LeaderboardView);

View File

@ -134,6 +134,8 @@ class UpvoteView extends Component {
const _percent = `${(sliderValue * 100).toFixed(0)}%`;
const _amount = `$${amount}`;
const _totalPayout = totalPayout ? totalPayout : '0.000';
return (
<PopoverController>
{({
@ -167,8 +169,8 @@ class UpvoteView extends Component {
name={iconName}
/>
)}
{isShowPayoutValue && totalPayout && (
<Text style={[styles.payoutValue, isDecinedPayout && styles.declinedPayout]}>{`$${totalPayout}`}</Text>
{isShowPayoutValue && (
<Text style={[styles.payoutValue, isDecinedPayout && styles.declinedPayout]}>{`$${_totalPayout}`}</Text>
)}
</Fragment>
</TouchableOpacity>