Skip to content

Commit

Permalink
update comment app
Browse files Browse the repository at this point in the history
  • Loading branch information
huzidaha committed Mar 20, 2017
1 parent bdb3bf0 commit 36abc71
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion comment-app/src/CommentInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ class CommentInput extends Component {

handleSubmit () {
if (this.props.onSubmit) {
this.props.onSubmit({...this.state})
this.props.onSubmit({
username: this.state.username,
content: this.state.content,
})
}
this.setState({ content: '' })
}
Expand Down

0 comments on commit 36abc71

Please sign in to comment.