// Copyright (c) 2015 Mattermost, Inc. All Rights Reserved. // See License.txt for license information. export default class EmailVerify extends React.Component { constructor(props) { super(props); this.handleResend = this.handleResend.bind(this); this.state = {}; } handleResend() { const newAddress = window.location.href.replace('&resend_success=true', ''); window.location.href = newAddress + '&resend=true'; } render() { var title = ''; var body = ''; var resend = ''; var resendConfirm = ''; if (this.props.isVerified === 'true') { title = global.window.mm_config.SiteName + ' Email Verified'; body =

Your email has been verified! Click Please verify your email address. Check your inbox for an email.

; resend = ( ); if (this.props.resendSuccess) { resendConfirm =

{' Verification email sent.'}

; } } return (

{title}

{body} {resend} {resendConfirm}
); } } EmailVerify.defaultProps = { isVerified: 'false', teamURL: '', userEmail: '', resendSuccess: 'false' }; EmailVerify.propTypes = { isVerified: React.PropTypes.string, teamURL: React.PropTypes.string, userEmail: React.PropTypes.string, resendSuccess: React.PropTypes.string };