<commit_before>import * as React from "react";
import { withRouter, RouteComponentProps } from "react-router-dom";
import {
  List,
  ListItem,
  ListItemText,
  Paper,
  createStyles,
  Theme,
  Typography,
  Button,
  WithStyles,
  withStyles,
  FormControl,
  InputLabel,
  Input,
  InputAdornment,
  AppBar
} from "@material-ui/core";
import AddIcon from "@material-ui/icons/Add";
import FilterIcon from "@material-ui/icons/Search"
import ApiService from "../../common/ApiService";

class GameList extends React.Component<IGameListProps, any> {
  constructor(props: any) {
    super(props);

    this.state = {
      filter: ''
    }
  }

  private handleFilterChange = (event) => {
    this.setState({
      filter: event.target.value.toLowerCase()
    })
  }

  public render() {
    const { classes, games } = this.props
    const noGames = !games || games.length === 0

    return (
      <Paper className={classes.root}>
        <AppBar position='static' className={classes.header}>
          <Typography className={classes.contrastText} variant="headline">{this.props.title}</Typography>
          <Button onClick={this.props.openDialog} className={classes.contrastText}><AddIcon /> new room</Button>
        </AppBar>
        <div className={classes.content}>
          <FormControl>
            <InputLabel htmlFor="game-filter">Filter</InputLabel>
            <Input
              id="game-filter"
              type="text"
              value={this.state.filter}
              onChange={this.handleFilterChange}
              endAdornment={
                <InputAdornment position="end">
                  <FilterIcon />
                </InputAdornment>
              }<commit_msg>new room -> +game<commit_after>import * as React from "react";
import { withRouter, RouteComponentProps } from "react-router-dom";
import {
  List,
  ListItem,
  ListItemText,
  Paper,
  createStyles,
  Theme,
  Typography,
  Button,
  WithStyles,
  withStyles,
  FormControl,
  InputLabel,
  Input,
  InputAdornment,
  AppBar
} from "@material-ui/core";
import AddIcon from "@material-ui/icons/Add";
import FilterIcon from "@material-ui/icons/Search"
import ApiService from "../../common/ApiService";

class GameList extends React.Component<IGameListProps, any> {
  constructor(props: any) {
    super(props);

    this.state = {
      filter: ''
    }
  }

  private handleFilterChange = (event) => {
    this.setState({
      filter: event.target.value.toLowerCase()
    })
  }

  public render() {
    const { classes, games } = this.props
    const noGames = !games || games.length === 0

    return (
      <Paper className={classes.root}>
        <AppBar position='static' className={classes.header}>
          <Typography className={classes.contrastText} variant="headline">{this.props.title}</Typography>
          <Button onClick={this.props.openDialog} className={classes.contrastText}>
            <AddIcon /> Game
          </Button>
        </AppBar>
        <div className={classes.content}>
          <FormControl>
            <InputLabel htmlFor="game-filter">Filter</InputLabel>
            <Input
              id="game-filter"
              type="text"
              value={this.state.filter}
              onChange={this.handleFilterChange}
              endAdornment={
                <InputAdornment position="end">
                  <FilterIcon />
                </InputAdornment>
              }
{'fraction_non_alphanumeric': 0.12609713282621415, 'fraction_numerical': 0.0005851375073142189, 'mean_word_length': 2.481670061099796, 'pattern_counts': {'":': 0, '<': 37, '<?xml version=': 0, '>': 38, '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': '3612903', 'n_tokens_mistral': 982, 'n_tokens_neox': 974, 'n_words': 197}