additional rewards page changes and new verification flow #542
2 changed files with 4 additions and 2 deletions
|
@ -1,4 +1,5 @@
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
|
import { makeSelectClientSetting } from 'redux/selectors/settings';
|
||||||
import { selectBalance } from 'lbry-redux';
|
import { selectBalance } from 'lbry-redux';
|
||||||
import { selectUnclaimedRewardValue } from 'lbryinc';
|
import { selectUnclaimedRewardValue } from 'lbryinc';
|
||||||
import FloatingWalletBalance from './view';
|
import FloatingWalletBalance from './view';
|
||||||
|
@ -6,6 +7,7 @@ import FloatingWalletBalance from './view';
|
||||||
const select = state => ({
|
const select = state => ({
|
||||||
balance: selectBalance(state),
|
balance: selectBalance(state),
|
||||||
unclaimedRewardAmount: selectUnclaimedRewardValue(state),
|
unclaimedRewardAmount: selectUnclaimedRewardValue(state),
|
||||||
|
rewardsNotInterested: makeSelectClientSetting(Constants.SETTING_REWARDS_NOT_INTERESTED)(state),
|
||||||
});
|
});
|
||||||
|
|
||||||
export default connect(select, null)(FloatingWalletBalance);
|
export default connect(select, null)(FloatingWalletBalance);
|
||||||
|
|
|
@ -14,11 +14,11 @@ type Props = {
|
||||||
|
|
||||||
class FloatingWalletBalance extends React.PureComponent<Props> {
|
class FloatingWalletBalance extends React.PureComponent<Props> {
|
||||||
render() {
|
render() {
|
||||||
const { balance, navigation, unclaimedRewardAmount } = this.props;
|
const { balance, navigation, rewardsNotInterested, unclaimedRewardAmount } = this.props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View style={[floatingButtonStyle.view, floatingButtonStyle.bottomRight]}>
|
<View style={[floatingButtonStyle.view, floatingButtonStyle.bottomRight]}>
|
||||||
{unclaimedRewardAmount > 0 &&
|
{(!rewardsNotInterested && unclaimedRewardAmount > 0) &&
|
||||||
<TouchableOpacity style={floatingButtonStyle.pendingContainer}
|
<TouchableOpacity style={floatingButtonStyle.pendingContainer}
|
||||||
onPress={() => navigation && navigation.navigate({ routeName: 'Rewards' })} >
|
onPress={() => navigation && navigation.navigate({ routeName: 'Rewards' })} >
|
||||||
<Icon name="award" size={18} style={floatingButtonStyle.rewardIcon} />
|
<Icon name="award" size={18} style={floatingButtonStyle.rewardIcon} />
|
||||||
|
|
Loading…
Add table
Reference in a new issue