code duplicated
This commit is contained in:
parent
761a41d183
commit
6c84470408
|
@ -34,33 +34,20 @@ class LoginView extends React.Component {
|
||||||
username: '',
|
username: '',
|
||||||
password: ''
|
password: ''
|
||||||
};
|
};
|
||||||
this.props.navigator.setSubTitle({
|
|
||||||
subtitle: this.props.server
|
|
||||||
});
|
|
||||||
this.props.navigator.setTitle({
|
|
||||||
title: 'Login'
|
|
||||||
});
|
|
||||||
this.props.navigator.setButtons({
|
|
||||||
rightButtons: [{
|
|
||||||
id: 'close',
|
|
||||||
title: 'Cancel'
|
|
||||||
}],
|
|
||||||
animated: true
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
componentWillReceiveProps() {
|
componentWillReceiveProps() {
|
||||||
this.props.navigator.setSubTitle({
|
const { navigator } = this.props;
|
||||||
subtitle: this.props.server
|
navigator.setTitle({
|
||||||
});
|
|
||||||
this.props.navigator.setTitle({
|
|
||||||
title: 'Login'
|
title: 'Login'
|
||||||
});
|
});
|
||||||
this.props.navigator.setButtons({
|
navigator.setSubTitle({
|
||||||
|
subtitle: this.props.server
|
||||||
|
});
|
||||||
|
navigator.setButtons({
|
||||||
rightButtons: [{
|
rightButtons: [{
|
||||||
id: 'close',
|
id: 'close',
|
||||||
title: 'Cancel'
|
title: 'Cancel'
|
||||||
}],
|
}]
|
||||||
animated: true
|
|
||||||
});
|
});
|
||||||
this.props.navigator.setOnNavigatorEvent(this.onNavigatorEvent.bind(this));
|
this.props.navigator.setOnNavigatorEvent(this.onNavigatorEvent.bind(this));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue