Commit eb37b68a authored by Trisno's avatar Trisno

fixing button change password

parent 9bb34387
...@@ -29,7 +29,7 @@ class ChangePassword extends React.Component { ...@@ -29,7 +29,7 @@ class ChangePassword extends React.Component {
"password": this.state.Password, "password": this.state.Password,
"password_confirmation": this.state.Password_confirmation "password_confirmation": this.state.Password_confirmation
} }
Axios.post(this.props.BASE_URL+'crm/v2/auth/change_password', params).then(res => { Axios.post(this.props.BASE_URL + 'crm/v2/auth/change_password', params).then(res => {
this.props.navigation.navigate('Profile'); this.props.navigation.navigate('Profile');
Toast.show('Ganti Password Berhasil') Toast.show('Ganti Password Berhasil')
}).catch(error => { }).catch(error => {
...@@ -88,8 +88,8 @@ class ChangePassword extends React.Component { ...@@ -88,8 +88,8 @@ class ChangePassword extends React.Component {
<Button title="Change Password" onPress={() => this.changePassword()}></Button> <Button title="Change Password" onPress={() => this.changePassword()}></Button>
</View> */} </View> */}
<TouchableOpacity onPress={() => this.changePassword()}> <TouchableOpacity onPress={() => this.changePassword()} style={styles.button}>
<View style={styles.button}> <View>
<Text style={{ color: 'white', fontSize: 16, fontFamily: 'Gotham-Black' }}>{i18n.t('changepassword')}</Text> <Text style={{ color: 'white', fontSize: 16, fontFamily: 'Gotham-Black' }}>{i18n.t('changepassword')}</Text>
</View> </View>
</TouchableOpacity> </TouchableOpacity>
...@@ -148,10 +148,10 @@ const styles = StyleSheet.create({ ...@@ -148,10 +148,10 @@ const styles = StyleSheet.create({
button: { button: {
backgroundColor: '#CFB368', backgroundColor: '#CFB368',
marginTop: 50, marginTop: 50,
marginHorizontal: 100, marginHorizontal: 80,
borderRadius: 10, borderRadius: 10,
padding:10, padding: 10,
height:40, height: 40,
alignItems: 'center', alignItems: 'center',
justifyContent: 'center' justifyContent: 'center'
}, },
...@@ -162,7 +162,7 @@ const mapStateToProps = (state) => { ...@@ -162,7 +162,7 @@ const mapStateToProps = (state) => {
return { return {
session_id: state.session_id, session_id: state.session_id,
language: state.language, language: state.language,
BASE_URL : state.BASE_URL BASE_URL: state.BASE_URL
} }
} }
......
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