From 7a07d5380d66015b553be0bd99fc4f0a97a27f1b Mon Sep 17 00:00:00 2001 From: catarak Date: Mon, 27 Jun 2016 13:54:50 -0400 Subject: [PATCH] add proptypes to signup form --- client/modules/User/components/SignupForm.js | 119 ++++++++++--------- 1 file changed, 64 insertions(+), 55 deletions(-) diff --git a/client/modules/User/components/SignupForm.js b/client/modules/User/components/SignupForm.js index 57c8ca52..abd6e3a5 100644 --- a/client/modules/User/components/SignupForm.js +++ b/client/modules/User/components/SignupForm.js @@ -1,59 +1,68 @@ -import React from 'react'; +import React, { PropTypes } from 'react'; -class SignupForm extends React.Component { - render() { - const { fields: { username, email, password, confirmPassword }, handleSubmit } = this.props; - return ( -
-

- - -

-

- - -

-

- - -

-

- - -

- -
- ); - } +function SignupForm(props) { + const { fields: { username, email, password, confirmPassword }, handleSubmit } = props; + return ( +
+

+ + +

+

+ + +

+

+ + +

+

+ + +

+ +
+ ); } +SignupForm.propTypes = { + fields: PropTypes.shape({ + username: PropTypes.string.isRequired, + email: PropTypes.string.isRequired, + password: PropTypes.string.isRequired, + confirmPassword: PropTypes.string.isRequired + }).isRequired, + handleSubmit: PropTypes.func.isRequired, + signUpUser: PropTypes.func.isRequired +}; + export default SignupForm;