|
@@ -2,21 +2,22 @@ import React, { Component } from 'react'
|
|
import { connect } from 'react-redux';
|
|
import { connect } from 'react-redux';
|
|
import { bindActionCreators } from 'redux';
|
|
import { bindActionCreators } from 'redux';
|
|
|
|
|
|
-import { signInRequest } from './../../actions/auth/signIn'
|
|
|
|
-import { signUpRequest } from './../../actions/auth/signUp'
|
|
|
|
-
|
|
|
|
-import { auth } from '../../firebase_config'
|
|
|
|
|
|
+import { signInRequest,userIsNotSignedIn } from './../../actions/auth/signIn';
|
|
|
|
+import { signUpRequest } from './../../actions/auth/signUp';
|
|
|
|
+import { categoryRequest} from '../../actions/card/action-card'
|
|
|
|
|
|
class AuthPage extends Component {
|
|
class AuthPage extends Component {
|
|
constructor(props) {
|
|
constructor(props) {
|
|
super(props);
|
|
super(props);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
|
|
render() {
|
|
render() {
|
|
const { isFetching, error, user } = this.props.auth;
|
|
const { isFetching, error, user } = this.props.auth;
|
|
const { signInRequest } = this.props;
|
|
const { signInRequest } = this.props;
|
|
|
|
+
|
|
|
|
|
|
- console.log("<AuthPage> - props", this.props);
|
|
|
|
|
|
+ console.log("<AuthPage> - props",this.props);
|
|
|
|
|
|
return (
|
|
return (
|
|
<div className="auth-page">
|
|
<div className="auth-page">
|
|
@@ -30,12 +31,16 @@ class AuthPage extends Component {
|
|
const
|
|
const
|
|
mapStateToProps = state => ({
|
|
mapStateToProps = state => ({
|
|
auth: {
|
|
auth: {
|
|
- ...state.signIn
|
|
|
|
- }
|
|
|
|
|
|
+ ...state.signIn,
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ ...state.card
|
|
}),
|
|
}),
|
|
mapDispatchToProps = dispatch => bindActionCreators({
|
|
mapDispatchToProps = dispatch => bindActionCreators({
|
|
signInRequest,
|
|
signInRequest,
|
|
- signUpRequest
|
|
|
|
|
|
+ signUpRequest,
|
|
|
|
+ categoryRequest,
|
|
|
|
+ userIsNotSignedIn
|
|
}, dispatch);
|
|
}, dispatch);
|
|
|
|
|
|
export default connect(mapStateToProps, mapDispatchToProps)(AuthPage)
|
|
export default connect(mapStateToProps, mapDispatchToProps)(AuthPage)
|