<commit_before>import React from 'react';
import PropTypes from 'prop-types';
import {
  connect,
} from 'react-redux';
import {
  CardTitle,
} from 'material-ui/Card';
import ActionHelp from 'material-ui/svg-icons/action/help';
import Error from 'components/Error';
import Spinner from 'components/Spinner';
import strings from 'lang';
import PlayedWith from './PlayedWith';
import styles from './PlayerStats.css';

export const PlayerStatsCards = ({
  loading,
  error,
  partyRank,
  soloRank,
  mmrEstimate,
  wins,
  losses,
  compact,
  playerId,
  loggedInId,
}) => {
  if (error) {
    return <Error />;
  }
  if (loading) {
    return <Spinner />;
  }
  return (
    <div className={compact ? styles.compactContainer : styles.container}>
      <div className={compact && styles.compactRow}>
        <CardTitle
          className={styles.playerStats}
          subtitle={<div className={styles.textSuccess}>{wins}</div>}
          title={strings.th_wins}
        />
        <CardTitle
          className={styles.playerStats}
          subtitle={<div className={styles.textDanger}>{losses}</div>}
          title={strings.th_losses}
        />
        <CardTitle
          className={styles.playerStats}
          subtitle={`${((wins / (wins + losses)) * 100).toFixed(2)}%`}
          title={strings.th_winrate}
        />
      </div>
      <div className={compact && styles.compactRow}>
        {soloRank && (
          <CardTitle
            className={styles.playerStats}
            subtitle={soloRank || 'N/A'}
            title={strings.th_solo_mmr}
          />
        )}
        {partyRank && (
          <CardTitle
            className={styles.playerStats}
            subtitle={partyRank || 'N/A'}
            title={strings.th_party_mmr}
          />
        )}
        {mmrEstimate.estimate > 0 && (
          <CardTitle
            className={styles.playerStats}<commit_msg>Displaying of default values for player's MMR and win rate.<commit_after>import React from 'react';
import PropTypes from 'prop-types';
import {
  connect,
} from 'react-redux';
import {
  CardTitle,
} from 'material-ui/Card';
import ActionHelp from 'material-ui/svg-icons/action/help';
import Error from 'components/Error';
import Spinner from 'components/Spinner';
import strings from 'lang';
import PlayedWith from './PlayedWith';
import styles from './PlayerStats.css';

export const PlayerStatsCards = ({
  loading,
  error,
  partyRank,
  soloRank,
  mmrEstimate,
  wins,
  losses,
  compact,
  playerId,
  loggedInId,
}) => {
  if (error) {
    return <Error />;
  }
  if (loading) {
    return <Spinner />;
  }
  return (
    <div className={compact ? styles.compactContainer : styles.container}>
      <div className={compact && styles.compactRow}>
        <CardTitle
          className={styles.playerStats}
          subtitle={<div className={styles.textSuccess}>{wins}</div>}
          title={strings.th_wins}
        />
        <CardTitle
          className={styles.playerStats}
          subtitle={<div className={styles.textDanger}>{losses}</div>}
          title={strings.th_losses}
        />
        <CardTitle
          className={styles.playerStats}
          subtitle={wins + losses ? `${((wins / (wins + losses)) * 100).toFixed(2)}%` : 'N/A'}
          title={strings.th_winrate}
        />
      </div>
      <div className={compact && styles.compactRow}>
        {soloRank && (
          <CardTitle
            className={styles.playerStats}
            subtitle={soloRank || 'N/A'}
            title={strings.th_solo_mmr}
          />
        )}
        {partyRank && (
          <CardTitle
            className={styles.playerStats}
            subtitle={partyRank || 'N/A'}
            title={strings.th_party_mmr}
          />
        )}
        {mmrEstimate && mmrEstimate.estimate > 0 && (
          <CardTitle
            className={styles.playerStats}
{'fraction_non_alphanumeric': 0.13700746845222767, 'fraction_numerical': 0.0025753283543651817, 'mean_word_length': 2.35405872193437, 'pattern_counts': {'":': 0, '<': 35, '<?xml version=': 0, '>': 37, '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': '3860769', 'n_tokens_mistral': 1180, 'n_tokens_neox': 1156, 'n_words': 224}