gazaskygeeks / mpcc-assistant

Platform to consolidate info/docs from visiting GSG mentors
https://mpcc-assistant.herokuapp.com/
0 stars 0 forks source link

MentorForm.submitForm() should pass state, not props.form, to action creator #123

Open tomduggan85 opened 6 years ago

tomduggan85 commented 6 years ago

https://github.com/gazaskygeeks/mpcc-assistant/blob/6c0d9f5c76bfbdaaca06b7ae96da798f17b20cd3/src/client/components/mentorForm/MentorForm.js#L15

I think the MentorForm component is keeping all of the user's input in this.state, if I'm reading handleInputChange correctly. However, submitForm is passing this.props.form, instead of this.state, as the form data to postMentorForm(). I think this means that the POST will receive the form structure but none of the user's actual form answers.