Commit f301b9c8 authored by William Goszal's avatar William Goszal 🚴

matiin spinner=true saat coba get location di home

parent 347ff4c8
...@@ -140,9 +140,6 @@ class Home extends React.Component { ...@@ -140,9 +140,6 @@ class Home extends React.Component {
} }
} }
_getCurrentPosisition = async () => { _getCurrentPosisition = async () => {
this.setState({
spinner: true,
})
let location = await Location.getCurrentPositionAsync({ let location = await Location.getCurrentPositionAsync({
accuracy: Location.Accuracy.Highest accuracy: Location.Accuracy.Highest
}) })
...@@ -307,11 +304,14 @@ class Home extends React.Component { ...@@ -307,11 +304,14 @@ class Home extends React.Component {
session_id: this.props.session_id, session_id: this.props.session_id,
}) })
console.log("start processing claim_old_balance")
Axios.post(this.props.BASE_URL + 'crm/v2/card/claim_old_balance', params).then(res => { Axios.post(this.props.BASE_URL + 'crm/v2/card/claim_old_balance', params).then(res => {
console.log("success processing claim_old_balance")
this.setState({spinner: false}) this.setState({spinner: false})
this._account() this._account()
// Alert.alert(i18n.t('success'), i18n.t('alertclaimcredit')) // Alert.alert(i18n.t('success'), i18n.t('alertclaimcredit'))
}).catch(error => { }).catch(error => {
console.log("failed processing claim_old_balance")
this.setState({spinner: false}) this.setState({spinner: false})
this._account() this._account()
let response = error.response.data let response = error.response.data
......
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