| changeset 90 | 990f2c928b15 |
| parent 89 | 06f609adfbf8 |
| child 94 | 2c2a9c8dc216 |
| 89:06f609adfbf8 | 90:990f2c928b15 |
|---|---|
1 import React, { Component } from 'react'; |
1 import React, { Component } from 'react'; |
2 import { connect } from 'react-redux'; |
2 import { connect } from 'react-redux'; |
3 import { bindActionCreators } from 'redux'; |
3 import { bindActionCreators } from 'redux'; |
4 import { Grid, Row, Col, Panel, FormGroup, ControlLabel, FormControl, Button, Alert, HelpBlock } from 'react-bootstrap'; |
4 import { Grid, Row, Col, Panel, FormGroup, ControlLabel, FormControl, Button, HelpBlock } from 'react-bootstrap'; |
5 import '../App.css'; |
5 import '../App.css'; |
6 import Navbar from './Navbar'; |
6 import Navbar from './Navbar'; |
7 import * as authActions from '../actions/authActions'; |
7 import * as authActions from '../actions/authActions'; |
8 |
8 |
9 class Register extends Component { |
9 class Register extends Component { |
18 } |
18 } |
19 |
19 |
20 onClickLogin = (e) => { |
20 onClickLogin = (e) => { |
21 e.preventDefault(); |
21 e.preventDefault(); |
22 this.props.history.push('/login'); |
22 this.props.history.push('/login'); |
23 } |
|
24 |
|
25 renderError() { |
|
26 return ( |
|
27 <Alert bsStyle="danger">Bad credentials</Alert> |
|
28 ) |
|
29 } |
23 } |
30 |
24 |
31 renderErrorMessage(errorMessages, fieldname) { |
25 renderErrorMessage(errorMessages, fieldname) { |
32 if (errorMessages && errorMessages.has(fieldname)) { |
26 if (errorMessages && errorMessages.has(fieldname)) { |
33 return errorMessages.get(fieldname).map((message, key) => |
27 return errorMessages.get(fieldname).map((message, key) => |