<commit_before>import React, {useState} from 'react';
const connect = require('react-redux').connect;
import PropTypes from 'prop-types';
import {FormattedMessage} from 'react-intl';

import Modal from '../base/modal.jsx';
require('./modal.scss');

const EmailConfirmationModal = ({
    email, onRequestClose, isOpen
}) => {
    const [showEmailTips, setShowEmailTips] = useState(false);

    return (
        <Modal
            isOpen={isOpen}
            showCloseButton
            useStandardSizes
            onRequestClose={onRequestClose}
        >
            <div className="top-close-bar" />
            <div className="modal-main-content">
                <img
                    className="modal-image"
                    alt="email-confirmation-illustration"
                    src="/svgs/modal/confirm-email-illustration.svg"
                />

                <div className="modal-text-content">
                    {showEmailTips ?
                        (<React.Fragment>
                            <h1><FormattedMessage id="emailConfirmationModal.confirmingTips" /></h1>
                            <ul>
                                <li><FormattedMessage id="emailConfirmationModal.tipWaitTenMinutes" /></li>
                                <li><FormattedMessage id="emailConfirmationModal.tipCheckSpam" /></li>
                                <li><FormattedMessage
                                    id="emailConfirmationModal.correctEmail"
                                    values={
                                        {accountSettings:
                                            (<a href="/accounts/email_change/">
                                                <FormattedMessage id="emailConfirmationModal.accountSettings" />
                                            </a>)
                                        }
                                    }
                                /></li>
                            </ul>
                        </React.Fragment>) :
                        (<React.Fragment>
                            <h1><FormattedMessage id="emailConfirmationModal.confirm" /></h1>
                            <p><FormattedMessage id="emailConfirmationModal.wantToShare" /></p>
                            <p><FormattedMessage id="emailConfirmationModal.clickEmailLink" /></p>
                            <p><b>{email}</b></p>
                            <a href="/accounts/email_change/">
                                <FormattedMessage id="emailConfirmationModal.resendEmail" />
                            </a>
                        </React.Fragment>)
                    }
                </div>
            </div>
            <div className="guide-footer">
                {showEmailTips ?
                    (<React.Fragment>
                        <FormattedMessage
                            id="emailConfirmationModal.wantMoreInfo"
                            values={
                                {FAQLink:
                                    (<a href="/faq">
                                        <FormattedMessage id="emailConfirmationModal.checkOutFAQ" />
                                    </a>)
                                }
                            }
                        />
                    </React.Fragment>) :
                    (<React.Fragment>
                        <FormattedMessage
                            id="emailConfirmationModal.havingTrouble"
                            values={{tipsLink: (
                                <a
                                    onClick={e => { // eslint-disable-line react/jsx-no-bind
                                        e.preventDefault();
                                        setShowEmailTips(true);<commit_msg>Revert "Revert "Unconfirmed user link hotfix""<commit_after>import React, {useState} from 'react';
const connect = require('react-redux').connect;
import PropTypes from 'prop-types';
import {FormattedMessage} from 'react-intl';

import Modal from '../base/modal.jsx';
require('./modal.scss');

const EmailConfirmationModal = ({
    email, onRequestClose, isOpen
}) => {
    const [showEmailTips, setShowEmailTips] = useState(false);

    return (
        <Modal
            isOpen={isOpen}
            showCloseButton
            useStandardSizes
            onRequestClose={onRequestClose}
        >
            <div className="top-close-bar" />
            <div className="modal-main-content">
                <img
                    className="modal-image"
                    alt="email-confirmation-illustration"
                    src="/svgs/modal/confirm-email-illustration.svg"
                />

                <div className="modal-text-content">
                    {showEmailTips ?
                        (<React.Fragment>
                            <h1><FormattedMessage id="emailConfirmationModal.confirmingTips" /></h1>
                            <ul>
                                <li><FormattedMessage id="emailConfirmationModal.tipWaitTenMinutes" /></li>
                                <li><FormattedMessage id="emailConfirmationModal.tipCheckSpam" /></li>
                                <li><FormattedMessage
                                    id="emailConfirmationModal.correctEmail"
                                    values={
                                        {accountSettings:
                                            (<a href="/accounts/email_change/">
                                                <FormattedMessage id="emailConfirmationModal.accountSettings" />
                                            </a>)
                                        }
                                    }
                                /></li>
                            </ul>
                        </React.Fragment>) :
                        (<React.Fragment>
                            <h1><FormattedMessage id="emailConfirmationModal.confirm" /></h1>
                            <p><FormattedMessage id="emailConfirmationModal.wantToShare" /></p>
                            <p><FormattedMessage id="emailConfirmationModal.clickEmailLink" /></p>
                            <p><b>{email}</b></p>
                            <a href="/accounts/email_change/">
                                <FormattedMessage id="emailConfirmationModal.resendEmail" />
                            </a>
                        </React.Fragment>)
                    }
                </div>
            </div>
            <div className="guide-footer">
                {showEmailTips ?
                    (<React.Fragment>
                        <FormattedMessage
                            id="emailConfirmationModal.wantMoreInfo"
                            values={
                                {FAQLink:
                                    (<a href="/faq#accounts">
                                        <FormattedMessage id="emailConfirmationModal.checkOutFAQ" />
                                    </a>)
                                }
                            }
                        />
                    </React.Fragment>) :
                    (<React.Fragment>
                        <FormattedMessage
                            id="emailConfirmationModal.havingTrouble"
                            values={{tipsLink: (
                                <a
                                    onClick={e => { // eslint-disable-line react/jsx-no-bind
                                        e.preventDefault();
                                        setShowEmailTips(true);
{'fraction_non_alphanumeric': 0.09729516806722689, 'fraction_numerical': 0.0010504201680672268, 'mean_word_length': 0.9312880324543611, 'pattern_counts': {'":': 0, '<': 111, '<?xml version=': 0, '>': 111, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 34, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4620425', 'n_tokens_mistral': 1663, 'n_tokens_neox': 1577, 'n_words': 230}