import React, { Component } from 'react';
import { Header } from 'semantic-ui-react';
import {bindActionCreators} from "redux";
import {push} from "connected-react-router";
import {connect} from "react-redux";
class SignUp extends Component {
render() {
return (
this.props.user.hasSignedUp
?(
There is already an account for this addresss.
If you want to create another account please change your address.
)
:(
Sign Up
Account address: {this.props.user.address}
UsernameFormContainer
)
);
}
}
const mapDispatchToProps = dispatch => bindActionCreators({
navigateTo: () => push()
}, dispatch);
const mapStateToProps = state => {
return {
user: state.user
}
};
const SignUpContainer = connect(mapStateToProps, mapDispatchToProps)(SignUp);
export default SignUpContainer;