blob: 2bf05b18b2ce17a91a25172207b2a65aada9b9b4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
import React, { Component } from 'react';
import { connect } from "react-redux";
import WithFooter from '../../shared/footer.hoc';
import { loginMock } from './login.service';
import { loginRequest } from '../../actions/login.action';
import HttpService from '../../services/http.service';
class LoginContainer extends Component {
state = {
};
onLogin = ()=>{
let params = {
email: "eve.holt@reqres.in",
password: "cityslicka"
};
// loginMock(params).then(res=>{
// console.log(res);
// })
this.props.dispatch(loginRequest(params));
// HttpService.cancelRequest();
}
render() {
return (
<div className="container-fluid">
<div className="row">
<div className="col-md-12">
Login
</div>
<div className="col-md-12">
<button className="btn btn-primary" onClick={this.onLogin}>Login</button>
</div>
</div>
</div>
);
}
}
const mapStateToProps = state => {
return {
};
};
export default connect(mapStateToProps)(
WithFooter(LoginContainer)
);
|