|
@@ -0,0 +1,27 @@
|
|
|
+import React, { Component } from "react";
|
|
|
+import { reduxForm, Field } from "redux-form";
|
|
|
+
|
|
|
+import { renderField } from "../common/formFunc";
|
|
|
+import { authValidate } from "../utils/validate";
|
|
|
+
|
|
|
+class Form extends Component {
|
|
|
+
|
|
|
+
|
|
|
+ submit = values => {
|
|
|
+ };
|
|
|
+
|
|
|
+ render() {
|
|
|
+ const { handleSubmit } = this.props;
|
|
|
+ return (
|
|
|
+ <form className="auth__form" onSubmit={handleSubmit(this.submit)}>
|
|
|
+ <Field name="email" type="email" label="E-mail:" placeholder="example@email.com" component={renderField} />
|
|
|
+
|
|
|
+ <Field name="password" type="password" label="Password:" placeholder ="password" component={renderField} />
|
|
|
+
|
|
|
+ <button className="auth__submit-button">Submit</button>
|
|
|
+ </form>
|
|
|
+ );
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+export default reduxForm({ form: "authForm", validate: authValidate })(Form);
|