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

benerin spiner dimenuselection

parent e5f149a8
...@@ -247,12 +247,18 @@ class MenuSelection extends React.Component { ...@@ -247,12 +247,18 @@ class MenuSelection extends React.Component {
this.setState({ this.setState({
state_add_remove_voucher: false state_add_remove_voucher: false
}) })
this.setState({
spinner: false,
})
this.props.removeVoucher() this.props.removeVoucher()
} else { } else {
let voucherProps = { let voucherProps = {
value_voucher: res.data.reward, value_voucher: res.data.reward,
voucher: res.data.reward voucher: res.data.reward
} }
this.setState({
spinner: false,
})
this.props.setVoucher(voucherProps); this.props.setVoucher(voucherProps);
} }
...@@ -271,6 +277,9 @@ class MenuSelection extends React.Component { ...@@ -271,6 +277,9 @@ class MenuSelection extends React.Component {
// this.props.removeVoucher() // this.props.removeVoucher()
} catch (error) { } catch (error) {
Alert.alert("", error.toString()) Alert.alert("", error.toString())
this.setState({
spinner: false,
})
} }
}) })
} }
......
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