Commit d61e607f authored by Trisno's avatar Trisno

benerin use balance di halaman account

parent 46182fdc
...@@ -170,6 +170,15 @@ class Account extends React.Component { ...@@ -170,6 +170,15 @@ class Account extends React.Component {
} }
} }
_useBalance(){
if(this.props.in_payment){
this.props.navigation.navigate('Redeem Code')
} else {
this.props.navigation.navigate('UseBalance')
}
}
render() { render() {
const navigation = this.props.navigation const navigation = this.props.navigation
...@@ -297,7 +306,7 @@ class Account extends React.Component { ...@@ -297,7 +306,7 @@ class Account extends React.Component {
</Card> </Card>
</TouchableOpacity> </TouchableOpacity>
<View style={{ width: 5 }}></View> <View style={{ width: 5 }}></View>
<TouchableOpacity style={{ marginBottom: 5, margin: 3 }} onPress={() => this.props.navigation.navigate('UseBalance')}> <TouchableOpacity style={{ marginBottom: 5, margin: 3 }} onPress={() => this._useBalance()}>
<Card style={{ height: 120, width: 155 }}> <Card style={{ height: 120, width: 155 }}>
<View style={{ height: 50, alignItems: 'center', padding: 10 }}> <View style={{ height: 50, alignItems: 'center', padding: 10 }}>
<Image <Image
...@@ -481,6 +490,7 @@ const mapStateToProps = (state) => { ...@@ -481,6 +490,7 @@ const mapStateToProps = (state) => {
return { return {
session_id: state.session_id, session_id: state.session_id,
set_card: state.set_card, set_card: state.set_card,
in_payment: state.in_payment
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment