<commit_before>const React = require('react');
const PropTypes = require('prop-types');
const ga = require('../common/ga.js');

const DataNotAvailable = require('./DataNotAvailable.jsx');

function ErrorSink(props) {
    const error = props.error;

    if (error.handled) {
        if (error.authError) {
            return <DataNotAvailable reason={error.authError} />;
        }
        return <div className="machete-error">
            <div className="machete-error-explain">
                There was an error attempting to display the requested data.
                An error report has been automatically generated and sent to
                our support address. You may try again in a few minutes.
            </div>
        </div>;
    }
    return <div className="machete-error">
        <div className="machete-error-explain">
            There was an error attempting to display the requested data.
            Please report this error by copying the error information below
            and sending it to <a href="mailto:<EMAIL>?subject=Bug%20report"><EMAIL></a>.
        </div>
        <pre>
            {ga.errorToString(error)}
        </pre>
    </div>;
}<commit_msg>changed the way that error messages are styled to avoid madness and chaos<commit_after>const React = require('react');
const PropTypes = require('prop-types');
const ga = require('../common/ga.js');

const DataNotAvailable = require('./DataNotAvailable.jsx');

function ErrorSink(props) {
    const error = props.error;

    if (error.handled) {
        if (error.authError) {
            return <DataNotAvailable reason={error.authError} />;
        }
        return <div className="machete-error">
            <div className="machete-error-explain">
                There was an error attempting to display the requested data.
                An error report has been automatically generated and sent to
                our support address. You may try again in a few minutes.
            </div>
        </div>;
    }
    return <div className="machete-error">
        <div className="machete-error-explain">
            There was an error attempting to display the requested data.
            Please report this error by copying the error information below
            and sending it to <a href="mailto:<EMAIL>?subject=Bug%20report"><EMAIL></a>.
        </div>
        <textbox style={{ width: "100%", height: "100%" }} readOnly>
            {ga.errorToString(error)}
        </textbox>
    </div>;
}
{'fraction_non_alphanumeric': 0.11178126256533977, 'fraction_numerical': 0.004020908725371934, 'mean_word_length': 2.362162162162162, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 33, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6484585', 'n_tokens_mistral': 663, 'n_tokens_neox': 648, 'n_words': 214}