mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-12 19:23:13 +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);
|
||||
}
|
||||
|
||||
_onGetStatus(props = this.props) {
|
||||
_onGetStatus = (props = this.props) => {
|
||||
this._setState({status: 'Pending'});
|
||||
EdgehillAPI.makeRequest({
|
||||
method: 'GET',
|
||||
|
@ -53,7 +53,7 @@ export default class NewsletterSignup extends React.Component {
|
|||
});
|
||||
}
|
||||
|
||||
_onSubscribe() {
|
||||
_onSubscribe = () => {
|
||||
this._setState({status: 'Pending'});
|
||||
EdgehillAPI.makeRequest({
|
||||
method: 'POST',
|
||||
|
@ -67,7 +67,7 @@ export default class NewsletterSignup extends React.Component {
|
|||
});
|
||||
}
|
||||
|
||||
_onUnsubscribe() {
|
||||
_onUnsubscribe = () => {
|
||||
this._setState({status: 'Pending'});
|
||||
EdgehillAPI.makeRequest({
|
||||
method: 'DELETE',
|
||||
|
|
Loading…
Reference in a new issue