diff --git a/src/component/walletRewardsDriver/index.js b/src/component/walletRewardsDriver/index.js index d277a16..2856f8c 100644 --- a/src/component/walletRewardsDriver/index.js +++ b/src/component/walletRewardsDriver/index.js @@ -1,9 +1,10 @@ import { connect } from 'react-redux'; -import { selectUnclaimedRewardValue } from 'lbryinc'; +import { selectUnclaimedRewardValue, selectUser } from 'lbryinc'; import WalletRewardsDriver from './view'; const select = state => ({ unclaimedRewardAmount: selectUnclaimedRewardValue(state), + user: selectUser(state), }); export default connect(select)(WalletRewardsDriver); diff --git a/src/component/walletRewardsDriver/view.js b/src/component/walletRewardsDriver/view.js index d1f0d28..c3220bf 100644 --- a/src/component/walletRewardsDriver/view.js +++ b/src/component/walletRewardsDriver/view.js @@ -5,15 +5,31 @@ import walletStyle from 'styles/wallet'; class WalletRewardsDriver extends React.PureComponent { render() { - const { navigation, unclaimedRewardAmount } = this.props; + const { navigation, unclaimedRewardAmount, user } = this.props; + const signedIn = user && user.has_verified_email; return ( navigation.navigate('Rewards')}> - - Get {unclaimedRewardAmount > 0 ? unclaimedRewardAmount : ''} free credit - {unclaimedRewardAmount === 1 ? '' : 's'} after creating an account. - + {signedIn && ( + + {unclaimedRewardAmount === 0 && __('Free credits available in rewards.')} + {unclaimedRewardAmount === 1 && + __('%amount% free credit available in rewards.', { amount: unclaimedRewardAmount })} + {unclaimedRewardAmount > 1 && + __('%amount% free credits available in rewards.', { amount: unclaimedRewardAmount })}{' '} + {__('Tap to learn more.')} + + )} + + {!signedIn && ( + + {unclaimedRewardAmount === 1 && + __('Get %amount% free credit after creating an account.', { amount: unclaimedRewardAmount })} + {unclaimedRewardAmount !== 1 && + __('Get %amount% free credits after creating an account.', { amount: unclaimedRewardAmount })} + + )} ); }