Login page
Let's use the styled-component, ant design, and Redux form to build the login page. The page we're trying to build will look like the following screenshot:
Figure 5.2: Login page
The form will contain just three input components—an email
field, a password field, and a submit
button to submit the form when these fields are valid. So, let's create the login form into app/containers/Login/Form.js
, as follows:
const LoginForm = props => { const { handleSubmit, pristine, submitting, message } = props; return ( <Form onSubmit={handleSubmit} className="form-login-containers"> <Spin spinning={submitting} tip="Submitting..."> <H1 className="center">Rask Lege</H1> <Field name="email" hasFeedback component={renderInput} disabled={submitting} label="Email address" placeholder="[email protected]" /> <Field hasFeedback type="password...