From fa768c1c592c22dda2b9af215e760fe2efe4d5d9 Mon Sep 17 00:00:00 2001 From: Akinwale Ariwodola Date: Tue, 3 Dec 2019 15:14:16 +0100 Subject: [PATCH] update text for signed in users --- src/component/walletRewardsDriver/index.js | 3 ++- src/component/walletRewardsDriver/view.js | 20 +++++++++++++++----- 2 files changed, 17 insertions(+), 6 deletions(-) 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..ea99f21 100644 --- a/src/component/walletRewardsDriver/view.js +++ b/src/component/walletRewardsDriver/view.js @@ -5,15 +5,25 @@ 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 ? unclaimedRewardAmount : ''} free credit{unclaimedRewardAmount === 1 ? '' : 's'}{' '} + available in rewards. Tap to learn more. + + )} + + {!signedIn && ( + + Get {unclaimedRewardAmount > 0 ? unclaimedRewardAmount : ''} free credit + {unclaimedRewardAmount === 1 ? '' : 's'} after creating an account. + + )} ); }