Skip to content

Commit

Permalink
Correct default state
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Jackson committed Aug 10, 2018
1 parent 13a855b commit 2eab2f5
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions website/modules/components/MailingListSignup.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,20 +45,14 @@ Input.propTypes = {
};

class MailingListSignup extends Component {
state = {
email: "",
submitted: true
};
state = { email: "", submitted: false };

handleSubmit = e => {
e.preventDefault();

if (this.state.email) {
subscribeToMailingList(this.state.email).then(() => {
this.setState({
email: "",
submitted: true
});
this.setState({ email: "", submitted: true });
});
}
};
Expand Down

0 comments on commit 2eab2f5

Please sign in to comment.