Merge pull request #328 from lbryio/reward-card-touch-area

make the entire reward card area respond to touch
This commit is contained in:
Akinwale Ariwodola 2018-10-05 15:55:40 +01:00 committed by GitHub
commit 79400dd2b1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -62,7 +62,11 @@ class RewardCard extends React.PureComponent<Props> {
const claimed = !!reward.transaction_id;
return (
<View style={[rewardStyle.rewardCard, rewardStyle.row]}>
<TouchableOpacity style={[rewardStyle.rewardCard, rewardStyle.row]} onPress={() => {
if (!isPending && !claimed) {
this.onClaimPress();
}
}}>
<View style={rewardStyle.leftCol}>
{!isPending && <TouchableOpacity onPress={() => {
if (!claimed) {
@ -87,7 +91,7 @@ class RewardCard extends React.PureComponent<Props> {
<Text style={rewardStyle.rewardAmount}>{reward.reward_amount}</Text>
<Text style={rewardStyle.rewardCurrency}>LBC</Text>
</View>
</View>
</TouchableOpacity>
);
}
};