import React from 'react';
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 '../../reducers/auth/service';
import { selectAuthState } from '../../reducers/auth/selector';
import { EmptyLayout }from '../../../common/components/Layout/EmptyLayout';
import { IdentityProvider } from '@xr3ngine/common/src/interfaces/IdentityProvider';
// @ts-ignore
import styles from './Auth.module.scss';
import { Trans, useTranslation } from "react-i18next";
const mapStateToProps = (state: any): any => {
return {
auth: selectAuthState(state)
};
};
const mapDispatchToProps = (dispatch: Dispatch): any => ({
resendVerificationEmail: bindActionCreators(resendVerificationEmail, dispatch)
});
interface Props {
auth: any;
resendVerificationEmail: typeof resendVerificationEmail;
}
const ConfirmEmail = (props: Props): any => {
const { auth, resendVerificationEmail } = props;
const { t } = useTranslation();
const handleResendEmail = (e: any): any => {
e.preventDefault();
const identityProvider = auth.get('identityProvider') as IdentityProvider;
console.log('---------', identityProvider);
resendVerificationEmail(identityProvider.token);
};
return (
{t('user:auth.confirmEmail.header')}
Please check your email to verify your account.
If you didn't get an email, please click
to resend the verification email.