Commit b508b908 authored by Trisno's avatar Trisno

change toast

parent 23fbcedd
{ {
"expo": { "expo": {
"extra" : { "extra" : {
"buildNumber" : "120", "buildNumber" : "123",
"remarks": "" "remarks": ""
}, },
......
...@@ -103,8 +103,21 @@ class Home extends React.Component { ...@@ -103,8 +103,21 @@ class Home extends React.Component {
}).catch(error => { }).catch(error => {
let response = error.response.data; let response = error.response.data;
// console.log(response.msg) // custom Toast
Alert.alert('', response.msg); // 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 { ...@@ -325,10 +338,10 @@ class Home extends React.Component {
<View style={styles.container}> <View style={styles.container}>
{Platform.OS === 'ios' ? ( {Platform.OS === 'ios' ? (
<CustomIosStatusBar color='#CFB368'/> <CustomIosStatusBar color='#CFB368' />
) : ( ) : (
<StatusBar backgroundColor='#CFB368'/> <StatusBar backgroundColor='#CFB368' />
)} )}
<ScrollView> <ScrollView>
<View style={{ flex: 6 }}> <View style={{ flex: 6 }}>
<View style={styles.header}> <View style={styles.header}>
...@@ -848,6 +861,12 @@ const mapDispatchToProps = (dispacth) => { ...@@ -848,6 +861,12 @@ const mapDispatchToProps = (dispacth) => {
card_number: setCardNumberProps.card_number, 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