<commit_before>import classnames from 'classnames';
import React from 'react';
import PropTypes from 'prop-types';
import {t} from 'i18next';
import CurrentUserMenu from './CurrentUserMenu';

export default function CurrentUser({
  user,
  onLogOut,
  onStartLogIn,
}) {
  if (user.authenticated) {
    return <CurrentUserMenu user={user} onLogOut={onLogOut} />;
  }
  return (
    <div
      className={classnames('top-bar__current-user',
        'top-bar__menu-button',
        'top-bar__menu-button_primary',
      )}
    >
      <span
        className="top-bar__log-in-prompt"
        onClick={onStartLogIn}
      >
        {t('top-bar.session.log-in-prompt')}
      </span>
    </div>
  );
}

CurrentUser.propTypes = {
  user: PropTypes.shape({
    authenticated: PropTypes.boolean,
  }).isRequired,
  onLogOut: PropTypes.func.isRequired,
  onStartLogIn: PropTypes.func.isRequired,
};
<commit_msg>Enlarge log-in button click target<commit_after>import classnames from 'classnames';
import React from 'react';
import PropTypes from 'prop-types';
import {t} from 'i18next';
import CurrentUserMenu from './CurrentUserMenu';

export default function CurrentUser({
  user,
  onLogOut,
  onStartLogIn,
}) {
  if (user.authenticated) {
    return <CurrentUserMenu user={user} onLogOut={onLogOut} />;
  }
  return (
    <div
      className={classnames('top-bar__current-user',
        'top-bar__menu-button',
        'top-bar__menu-button_primary',
      )}
      onClick={onStartLogIn}
    >
      {t('top-bar.session.log-in-prompt')}
    </div>
  );
}

CurrentUser.propTypes = {
  user: PropTypes.shape({
    authenticated: PropTypes.boolean,
  }).isRequired,
  onLogOut: PropTypes.func.isRequired,
  onStartLogIn: PropTypes.func.isRequired,
};

{'fraction_non_alphanumeric': 0.13631156930126, 'fraction_numerical': 0.002290950744558992, 'mean_word_length': 3.4794871794871796, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '1351290', 'n_tokens_mistral': 581, 'n_tokens_neox': 581, 'n_words': 109}