<commit_before>import React from 'react';
import PropTypes from '../PropTypes.js';
import moment from 'moment';
import MatchesTable from '../matches/MatchesTable.js';
import {TeamPlayerAvatars} from './controls/TeamPlayerAvatars.js';
import {TeamOverviewPlayers} from './controls/TeamOverviewPlayers.js';
import {TeamOverviewRanking} from './controls/TeamOverviewRanking.js';
import {OpponentsTeamFormation} from '../matches/Match/OpponentsTeamFormation.js';


export const TeamOverview = ({team, small, t}) => {
  const today = moment().startOf('day');
  const nextMatches = team.getMatches().sort((a, b) => a.date - b.date).filter(m => m.date.isSame(today, 'day') || m.date.isAfter(today, 'day')).take(2); // eslint-disable-line
  const prevMatches = team.getMatches().sort((a, b) => b.date - a.date).filter(m => m.date.isBefore(today, 'day')).take(2);
  return (
    <div style={{paddingLeft: 5, paddingRight: 5}}>
      <TeamPlayerAvatars team={team} />
      <div className="col-md-8">
        <TeamOverviewRanking team={team} t={t} small={small} />
      </div>

      {false ? (
        // TODO: EndOfSeason need to enable here!!
        <div className="col-md-4">
          <h3>{t('common.teamFormations')}</h3>
          <OpponentsTeamFormation matches={team.getMatches()} hideHeader />
        </div>
      ) : null}

      <div className="col-md-12">
        <TeamOverviewMatches matches={prevMatches} team={team} title={t('match.playedMatches')} />
        <TeamOverviewMatches matches={nextMatches} team={team} title={t('match.nextMatches')} />

        <TeamOverviewPlayers team={team} />
      </div>
    </div><commit_msg>fix layout issue by previous 'improvement'<commit_after>import React from 'react';
import PropTypes from '../PropTypes.js';
import moment from 'moment';
import MatchesTable from '../matches/MatchesTable.js';
import {TeamPlayerAvatars} from './controls/TeamPlayerAvatars.js';
import {TeamOverviewPlayers} from './controls/TeamOverviewPlayers.js';
import {TeamOverviewRanking} from './controls/TeamOverviewRanking.js';
import {OpponentsTeamFormation} from '../matches/Match/OpponentsTeamFormation.js';


export const TeamOverview = ({team, small, t}) => {
  const today = moment().startOf('day');
  const nextMatches = team.getMatches().sort((a, b) => a.date - b.date).filter(m => m.date.isSame(today, 'day') || m.date.isAfter(today, 'day')).take(2); // eslint-disable-line
  const prevMatches = team.getMatches().sort((a, b) => b.date - a.date).filter(m => m.date.isBefore(today, 'day')).take(2);
  return (
    <div style={{paddingLeft: 5, paddingRight: 5}}>
      <TeamPlayerAvatars team={team} />
      <div className="col-md-12">
        <TeamOverviewRanking team={team} t={t} small={small} />
      </div>

      {false ? (
        // TODO: EndOfSeason: need to enable here!!
        //       Also change col-md-12 above back to col-md-8
        <div className="col-md-4">
          <h3>{t('common.teamFormations')}</h3>
          <OpponentsTeamFormation matches={team.getMatches()} hideHeader />
        </div>
      ) : null}


      <TeamOverviewMatches matches={prevMatches} team={team} title={t('match.playedMatches')} />
      <TeamOverviewMatches matches={nextMatches} team={team} title={t('match.nextMatches')} />

      <TeamOverviewPlayers team={team} />

    </div>
{'fraction_non_alphanumeric': 0.17450271247739602, 'fraction_numerical': 0.006630500301386378, 'mean_word_length': 3.7550143266475646, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 43, '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': '393304', 'n_tokens_mistral': 1097, 'n_tokens_neox': 1044, 'n_words': 216}