make the entire reward card area respond to touch
This commit is contained in:
parent
3d77756da0
commit
4409849143
1 changed files with 6 additions and 2 deletions
|
@ -62,7 +62,11 @@ class RewardCard extends React.PureComponent<Props> {
|
||||||
const claimed = !!reward.transaction_id;
|
const claimed = !!reward.transaction_id;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View style={[rewardStyle.rewardCard, rewardStyle.row]}>
|
<TouchableOpacity style={[rewardStyle.rewardCard, rewardStyle.row]} onPress={() => {
|
||||||
|
if (!isPending && !claimed) {
|
||||||
|
this.onClaimPress();
|
||||||
|
}
|
||||||
|
}}>
|
||||||
<View style={rewardStyle.leftCol}>
|
<View style={rewardStyle.leftCol}>
|
||||||
{!isPending && <TouchableOpacity onPress={() => {
|
{!isPending && <TouchableOpacity onPress={() => {
|
||||||
if (!claimed) {
|
if (!claimed) {
|
||||||
|
@ -87,7 +91,7 @@ class RewardCard extends React.PureComponent<Props> {
|
||||||
<Text style={rewardStyle.rewardAmount}>{reward.reward_amount}</Text>
|
<Text style={rewardStyle.rewardAmount}>{reward.reward_amount}</Text>
|
||||||
<Text style={rewardStyle.rewardCurrency}>LBC</Text>
|
<Text style={rewardStyle.rewardCurrency}>LBC</Text>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</TouchableOpacity>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue