Commit 9120deaa authored by Trisno's avatar Trisno

loading bar di home bagian card number

parent a5ff2b4d
...@@ -29,6 +29,7 @@ class Home extends React.Component { ...@@ -29,6 +29,7 @@ class Home extends React.Component {
my_lat: 0, my_lat: 0,
my_long: 0, my_long: 0,
indicator: true, indicator: true,
indicatorProfileCard: true,
slider_height: 350, slider_height: 350,
slugs: [], slugs: [],
placeholder: true placeholder: true
...@@ -59,6 +60,7 @@ class Home extends React.Component { ...@@ -59,6 +60,7 @@ class Home extends React.Component {
this._unsubscribe = this.props.navigation.addListener('focus', () => { this._unsubscribe = this.props.navigation.addListener('focus', () => {
this.setState({ this.setState({
indicator: true, indicator: true,
indicatorProfileCard: true
}) })
this._account(); this._account();
if (this.props.outlet_id == '' && this.props.name_outlet == '' && this.props.outlet_detailadress == '') { if (this.props.outlet_id == '' && this.props.name_outlet == '' && this.props.outlet_detailadress == '') {
...@@ -155,7 +157,7 @@ class Home extends React.Component { ...@@ -155,7 +157,7 @@ class Home extends React.Component {
balance: balance, balance: balance,
account_number: account_number, account_number: account_number,
expire_date: expire, expire_date: expire,
indicator: false indicatorProfileCard: false
}) })
}).catch(error => { }).catch(error => {
let response = error.response.data let response = error.response.data
...@@ -372,7 +374,13 @@ class Home extends React.Component { ...@@ -372,7 +374,13 @@ class Home extends React.Component {
{ {
this.state.indicator == true ? (<ActivityIndicator style={{ top: 20, justifyContent: "center" }} size="large" color="#c9af6d" />) : this.state.indicatorProfileCard == true ? (
<View style={styles.card}>
<Card style={{ padding: 20, margin: 10, alignContent: 'center' }}>
<ActivityIndicator style={{ top: 20, justifyContent: "center" }} size="large" color="#c9af6d" />
</Card>
</View>
) :
this.state.account_number === "" ? ( this.state.account_number === "" ? (
<View style={styles.card}> <View style={styles.card}>
<Card style={{ padding: 10, margin: 10, alignContent: 'center' }}> <Card style={{ padding: 10, margin: 10, alignContent: 'center' }}>
...@@ -453,9 +461,9 @@ class Home extends React.Component { ...@@ -453,9 +461,9 @@ class Home extends React.Component {
<View style={{ flexDirection: 'row', flex: 1 }}> <View style={{ flexDirection: 'row', flex: 1 }}>
<TouchableOpacity <TouchableOpacity
// style={styles.submitUpgradePemium} // style={styles.submitUpgradePemium}
activeOpacity={.5} activeOpacity={.5}
onPress={() => this.props.navigation.navigate('TopUpInfo')} onPress={() => this.props.navigation.navigate('TopUpInfo')}
> >
<View style={{ <View style={{
flex: 0.5, flex: 0.5,
height: 40, height: 40,
......
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