Commit b508b908 authored by Trisno's avatar Trisno

change toast

parent 23fbcedd
{
"expo": {
"extra" : {
"buildNumber" : "120",
"buildNumber" : "123",
"remarks": ""
},
......
......@@ -103,8 +103,21 @@ class Home extends React.Component {
}).catch(error => {
let response = error.response.data;
// console.log(response.msg)
Alert.alert('', response.msg);
// custom Toast
// Toast.show(response.msg, {
// position: 0,
// containerStyle: { backgroundColor: 'white', borderRadius: 10 },
// textColor: '#838383',
// textStyle: { fontSize: 14, fontFamily: 'Gotham-Black' }
// })
Toast.show(response.msg)
// Tes Logout jika session habis
// let configProps = {
// session_id: ''
// }
// this.props.setConfig(configProps);
// this.props.navigation.replace('Login');
})
}
......@@ -325,10 +338,10 @@ class Home extends React.Component {
<View style={styles.container}>
{Platform.OS === 'ios' ? (
<CustomIosStatusBar color='#CFB368'/>
<CustomIosStatusBar color='#CFB368' />
) : (
<StatusBar backgroundColor='#CFB368'/>
)}
<StatusBar backgroundColor='#CFB368' />
)}
<ScrollView>
<View style={{ flex: 6 }}>
<View style={styles.header}>
......@@ -848,6 +861,12 @@ const mapDispatchToProps = (dispacth) => {
card_number: setCardNumberProps.card_number,
}
}),
setConfig: (configProps) => dispacth({
type: ActionType.SET_LOGOUT,
data: {
session_id: configProps.session_id
}
}),
}
}
......
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