lbry-react-native/src/component/walletBalance/view.js
Akinwale Ariwodola 184d5d1ec3
i18n ()
* i18n all the strings
* assign file content
* download and save language files
* load language on startup
* load language setting correctly when app launches
* fix i18n calls in constants
* pin lbryinc commit
2019-12-05 13:16:43 +01:00

29 lines
940 B
JavaScript

// @flow
import React from 'react';
import { Image, Text, View } from 'react-native';
import { Lbry, formatCredits } from 'lbry-redux';
import Address from 'component/address';
import Button from 'component/button';
import walletStyle from 'styles/wallet';
type Props = {
balance: number,
};
class WalletBalance extends React.PureComponent<Props> {
render() {
const { balance } = this.props;
return (
<View style={walletStyle.balanceCard}>
<Image style={walletStyle.balanceBackground} resizeMode={'cover'} source={require('../../assets/stripe.png')} />
<Text style={walletStyle.balanceTitle}>{__('Balance')}</Text>
<Text style={walletStyle.balanceCaption}>{__('You currently have')}</Text>
<Text style={walletStyle.balance}>
{(balance || balance === 0) && formatCredits(parseFloat(balance), 2) + ' LBC'}
</Text>
</View>
);
}
}
export default WalletBalance;