Commit dbbc3b2f authored by Wahyu Adjie Prasetyo's avatar Wahyu Adjie Prasetyo

revisi home

parent 30e84a00
......@@ -39,7 +39,8 @@ class Home extends React.Component {
inbox: "0",
is_expired_date: true,
old_balance_claimed: true,
member_since: ""
member_since: "",
old_balance: 0
}
}
......@@ -179,6 +180,7 @@ class Home extends React.Component {
let is_expired = dataCard.is_expired
let old_balance_claimed = dataCard.old_balance_claimed
let member_since = dataCard.member_since
let old_balance = dataCard.old_balance
this.setState({
point: point,
......@@ -188,7 +190,9 @@ class Home extends React.Component {
indicatorProfileCard: false,
is_expired: is_expired,
old_balance_claimed: old_balance_claimed,
member_since: member_since
member_since: member_since,
old_balance: old_balance,
card_number: card_number
})
}).catch(error => {
let response = error.response.data
......@@ -446,7 +450,6 @@ class Home extends React.Component {
</View>
</Card>
</View>
) :
this.state.account_number !== "" && this.state.is_expired == false ? (
<View style={styles.card}>
......@@ -488,7 +491,7 @@ class Home extends React.Component {
{this.state.old_balance_claimed == false ? (
<Card style={{ padding: 10, margin: 10, alignContent: 'center' }}>
<View style={{ flex: 1, height: 80, borderRadius: 20, marginRight: 10, marginLeft: 10, justifyContent: 'center' }}>
<Text style={{ fontSize: 14, fontFamily: 'Gotham-Light', textAlign: 'center', marginBottom: 10 }}>CREDIT : 200.000 </Text>
<Text style={{ fontSize: 14, fontFamily: 'Gotham-Light', textAlign: 'center', marginBottom: 10 }}>CREDIT : {this.state.old_balance} </Text>
<View style={{ justifyContent: 'center' }}>
<TouchableOpacity onPress={() => this.handleClaimCredit()}>
<View style={{ height: 40, borderRadius: 10, backgroundColor: '#CFB368', marginRight: 20, marginLeft: 20, justifyContent: 'center' }}>
......@@ -548,7 +551,7 @@ class Home extends React.Component {
{this.state.old_balance_claimed == false ? (
<Card style={{ padding: 10, margin: 10, alignContent: 'center' }}>
<View style={{ flex: 1, height: 80, borderRadius: 20, marginRight: 10, marginLeft: 10, justifyContent: 'center' }}>
<Text style={{ fontSize: 14, fontFamily: 'Gotham-Light', textAlign: 'center', marginBottom: 10 }}>CREDIT : 200.000 </Text>
<Text style={{ fontSize: 14, fontFamily: 'Gotham-Light', textAlign: 'center', marginBottom: 10 }}>CREDIT : {this.state.old_balance} </Text>
<View style={{ justifyContent: 'center' }}>
<TouchableOpacity onPress={() => this.handleClaimCredit()}>
<View style={{ height: 40, borderRadius: 10, backgroundColor: '#CFB368', marginRight: 20, marginLeft: 20, justifyContent: 'center' }}>
......@@ -605,15 +608,15 @@ class Home extends React.Component {
</View>
)
}
<View style={{ flexDirection: 'row', flex: 1,height:40,marginTop:40}}>
<View style={{justifyContent:'center',flex:1}}>
<View style={{ flexDirection: 'row', flex: 1, height: 40, marginTop: 40 }}>
<View style={{ justifyContent: 'center', flex: 1 }}>
<TouchableOpacity onPress={() => this.props.navigation.navigate('TopUpInfo')}>
<View style={{ height: 40, borderRadius: 10, backgroundColor: '#CFB368', marginRight: 20, marginLeft: 20, justifyContent: 'center' }}>
<Text style={{ textAlign: 'center', color: 'white', fontFamily: 'Gotham-Black', fontSize: 14 }}>{i18n.t('topup')}</Text>
</View>
</TouchableOpacity>
</View>
<View style={{justifyContent:'center',flex:1}}>
<View style={{ justifyContent: 'center', flex: 1 }}>
<TouchableOpacity onPress={() => this.handleuseBalance()}>
<View style={{ height: 40, borderRadius: 10, backgroundColor: '#CFB368', marginRight: 20, marginLeft: 20, justifyContent: 'center' }}>
<Text style={{ textAlign: 'center', color: 'white', fontFamily: 'Gotham-Black', fontSize: 14 }}>{i18n.t('usebalance')}</Text>
......
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