Commit 29139c2d authored by William Goszal's avatar William Goszal 🚴

matiin spinner=true saat get location di account

parent f301b9c8
......@@ -85,10 +85,7 @@ class Account extends React.Component {
}
_getCurrentPosisition = async () => {
try {
this.setState({
spinner: true,
})
try {
let location = await Location.getCurrentPositionAsync({
accuracy: Location.Accuracy.Highest
})
......@@ -129,16 +126,18 @@ class Account extends React.Component {
let params = Object.assign(requestParams, {
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 => {
this.setState({spinner: false})
this._getProfile()
console.log("success processing claim_old_balance")
this.setState({spinner: false})
this._getProfile()
// Alert.alert(i18n.t('success'), i18n.t('alertclaimcredit'))
}).catch(error => {
this.setState({spinner: false})
this._getProfile()
let response = error.response.data
Alert.alert(error, response.msg)
console.log("failed processing claim_old_balance")
this.setState({spinner: false})
this._getProfile()
let response = error.response.data
Alert.alert(error, response.msg)
})
}
......
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