<commit_before>import React from 'react'

import Games from './Games'
import Teams from './Teams'
import Players from './Players'

import { removeGame } from '../../lib/gamesUtils'

class Dashboard extends React.Component {
  constructor (props) {
    super(props)
    this.state = {
      searchField: ''
    }
  }

  deleteGame = (e) => {
    e.preventDefault()
    removeGame(e.target.getAttribute('name'))
  }

  updateSearchField = (e) => {
    this.setState({searchField:e.target.value})
  }
  render () {
    const userId = this.props.userId
    const games = this.props.games || {}
    const teams = this.props.teams || {}
    const players = this.props.players || {}
    const fetching = this.props.fetchingGames || this.props.fetchingTeams || this.props.fetchingPlayers
    const searchField = this.state.searchField
    return (
      <div className='container content dashboard'>
        <input type='text' placeholder='search' onChange={this.updateSearchField} />
        <div className='row'>
          <div className='col-md-4'>
            <div className='page-header'>
              <h3>Games</h3>
            </div>
            {fetching ? <h3>Loading...</h3> : <Games userId={userId} games={games} teams={teams} deleteGame={this.deleteGame} isAdmin search={searchField} />}
          </div>
          <div className='col-md-4'>
            <div className='page-header'>
              <h3>Teams</h3>
            </div>
            {fetching ? <h3>Loading...</h3> : <Teams teams={teams} search={searchField} />}
          </div>
          <div className='col-md-4'>
            <div className='page-header'>
              <h3>Players</h3>
            </div>
            {fetching ? <h3>Loading...</h3> : <Players players={players} search={searchField} />}
          </div>
        </div>
      </div>
    )
  }
}

export default Dashboard
<commit_msg>Add search imput to row<commit_after>import React from 'react'

import Games from './Games'
import Teams from './Teams'
import Players from './Players'

import { removeGame } from '../../lib/gamesUtils'

class Dashboard extends React.Component {
  constructor (props) {
    super(props)
    this.state = {
      searchField: ''
    }
  }

  deleteGame = (e) => {
    e.preventDefault()
    removeGame(e.target.getAttribute('name'))
  }

  updateSearchField = (e) => {
    this.setState({searchField:e.target.value})
  }
  render () {
    const userId = this.props.userId
    const games = this.props.games || {}
    const teams = this.props.teams || {}
    const players = this.props.players || {}
    const fetching = this.props.fetchingGames || this.props.fetchingTeams || this.props.fetchingPlayers
    const searchField = this.state.searchField
    return (
      <div className='container content dashboard'>
        <div className='row'>
          <div className='col-md-4 col-md-offset-4'>
            <div className='input-group'>
              <input type='search' className='form-control' placeholder='search'  onChange={this.updateSearchField} />
              <span className='input-group-addon '>
                <span className=''/>
              </span>
            </div>
          </div>
        </div>
        <div className='row'>
          <div className='col-md-4'>
            <div className='page-header'>
              <h3>Games</h3>
            </div>
            {fetching ? <h3>Loading...</h3> : <Games userId={userId} games={games} teams={teams} deleteGame={this.deleteGame} isAdmin search={searchField} />}
          </div>
          <div className='col-md-4'>
            <div className='page-header'>
              <h3>Teams</h3>
            </div>
            {fetching ? <h3>Loading...</h3> : <Teams teams={teams} search={searchField} />}
          </div>
          <div className='col-md-4'>
            <div className='page-header'>
              <h3>Players</h3>
            </div>
            {fetching ? <h3>Loading...</h3> : <Players players={players} search={searchField} />}
          </div>
        </div>
      </div>
    )
  }
}

export default Dashboard

{'fraction_non_alphanumeric': 0.1573641504794689, 'fraction_numerical': 0.007868207523973445, 'mean_word_length': 2.185591229444009, 'pattern_counts': {'":': 0, '<': 76, '<?xml version=': 0, '>': 80, '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': '4009626', 'n_tokens_mistral': 1235, 'n_tokens_neox': 1235, 'n_words': 246}