mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-13 11:38:31 +08:00
fix(newsletter): Use bound functions for callbacks, always.
This commit is contained in:
parent
b3ec6048e9
commit
37bd069766
1 changed files with 3 additions and 3 deletions
|
@ -35,7 +35,7 @@ export default class NewsletterSignup extends React.Component {
|
||||||
this.setState(state);
|
this.setState(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
_onGetStatus(props = this.props) {
|
_onGetStatus = (props = this.props) => {
|
||||||
this._setState({status: 'Pending'});
|
this._setState({status: 'Pending'});
|
||||||
EdgehillAPI.makeRequest({
|
EdgehillAPI.makeRequest({
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
|
@ -53,7 +53,7 @@ export default class NewsletterSignup extends React.Component {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
_onSubscribe() {
|
_onSubscribe = () => {
|
||||||
this._setState({status: 'Pending'});
|
this._setState({status: 'Pending'});
|
||||||
EdgehillAPI.makeRequest({
|
EdgehillAPI.makeRequest({
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
|
@ -67,7 +67,7 @@ export default class NewsletterSignup extends React.Component {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
_onUnsubscribe() {
|
_onUnsubscribe = () => {
|
||||||
this._setState({status: 'Pending'});
|
this._setState({status: 'Pending'});
|
||||||
EdgehillAPI.makeRequest({
|
EdgehillAPI.makeRequest({
|
||||||
method: 'DELETE',
|
method: 'DELETE',
|
||||||
|
|
Loading…
Reference in a new issue