<commit_before>import React from 'react';
import { c } from 'ttag';
import { APPS } from 'proton-shared/lib/constants';

import { Label, Row, Field, Href } from '../../components';
import { useUser, useConfig } from '../../hooks';

const UsernameSection = () => {
    const { APP_NAME } = useConfig();
    const [{ Name, Email }] = useUser();

    if (APP_NAME === APPS.PROTONVPN_SETTINGS) {
        return (
            <>
                {Name ? (
                    <Row>
                        <Label>{c('Label').t`Name`}</Label>
                        <Field className="pt0-5">
                            <strong>{Name}</strong>
                        </Field>
                    </Row>
                ) : null}
                <Row>
                    <Label>{c('Label').t`ProtonMail address`}</Label>
                    <Field className="pt0-5">
                        {Email ? (
                            <strong>{Email}</strong>
                        ) : (
                            <Href
                                url="https://mail.protonmail.com/login"
                                title={c('Info').t`Log in to ProtonMail to activate your address`}
                            >{c('Link').t`Not activated`}</Href>
                        )}
                    </Field>
                </Row>
            </>
        );
    }

    return (
        <>
            {Name ? (
                <Row>
                    <Label>{c('Label').t`Name`}</Label>
                    <Field className="pt0-5">
                        <strong>{Name}</strong>
                    </Field>
                </Row>
            ) : (
                <Row>
                    <Label>{c('Label').t`Email`}</Label>
                    <Field className="pt0-5">
                        <strong>{Email}</strong>
                    </Field>
                </Row>
            )}
        </>
    );
};

export default UsernameSection;<commit_msg>[CP-903] Improve labeling for the external address in Proton Account<commit_after>import React from 'react';
import { c } from 'ttag';
import { APPS } from 'proton-shared/lib/constants';

import { Label, Row, Field, Href } from '../../components';
import { useUser, useConfig } from '../../hooks';

const UsernameSection = () => {
    const { APP_NAME } = useConfig();
    const [{ Name, Email }] = useUser();

    if (APP_NAME === APPS.PROTONVPN_SETTINGS) {
        return (
            <>
                {Name ? (
                    <Row>
                        <Label>{c('Label').t`Name`}</Label>
                        <Field className="pt0-5">
                            <strong>{Name}</strong>
                        </Field>
                    </Row>
                ) : null}
                <Row>
                    <Label>{c('Label').t`ProtonMail address`}</Label>
                    <Field className="pt0-5">
                        {Email ? (
                            <strong>{Email}</strong>
                        ) : (
                            <Href
                                url="https://mail.protonmail.com/login"
                                title={c('Info').t`Log in to ProtonMail to activate your address`}
                            >{c('Link').t`Not activated`}</Href>
                        )}
                    </Field>
                </Row>
            </>
        );
    }

    return (
        <>
            {Name ? (
                <Row>
                    <Label>{c('Label').t`Name`}</Label>
                    <Field className="pt0-5">
                        <strong>{Name}</strong>
                    </Field>
                </Row>
            ) : (
                <Row>
                    <Label>{c('Label').t`Email address`}</Label>
                    <Field className="pt0-5">
                        <strong>{Email}</strong>
                    </Field>
                </Row>
            )}
        </>
    );
};

export default UsernameSection;
{'fraction_non_alphanumeric': 0.14551394822819805, 'fraction_numerical': 0.004775069112842423, 'mean_word_length': 0.943359375, 'pattern_counts': {'":': 0, '<': 79, '<?xml version=': 0, '>': 81, 'https://': 2, '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': '4041387', 'n_tokens_mistral': 1052, 'n_tokens_neox': 981, 'n_words': 181}