import Button from '@material-ui/core/Button' import Box from '@material-ui/core/Box' import Typography from '@material-ui/core/Typography' import Container from '@material-ui/core/Container' import { connect } from 'react-redux' import { bindActionCreators, Dispatch } from 'redux' import { resendVerificationEmail } from '../../../redux/auth/service' import { selectAuthState } from '../../../redux/auth/selector' import EmptyLayout from '../Layout/EmptyLayout' import { IdentityProvider } from '../../../interfaces/IdentityProvider' import { AuthUser } from '../../../interfaces/AuthUser' import './style.scss' const mapStateToProps = (state: any) => { return { auth: selectAuthState(state) } } const mapDispatchToProps = (dispatch: Dispatch) => ({ resendVerificationEmail: bindActionCreators(resendVerificationEmail, dispatch) }) interface Props { auth: any resendVerificationEmail: typeof resendVerificationEmail } const ConfirmEmail = ({ auth, resendVerificationEmail }: Props) => { const authUser = auth.get('authUser') as AuthUser const handleResendEmail = (e: any) => { e.preventDefault() const identityProvider = this.props.auth.get('identityProvider') as IdentityProvider console.log('---------', identityProvider) this.props.resendVerificationEmail(identityProvider.token) } return (
Confirmation Email Please check your email to verify your account. If you didn't get an email, please click to resend the verification email.
) } const ConfirmEmailWrapper = (props) => export default connect( mapStateToProps, mapDispatchToProps )(ConfirmEmailWrapper)