<commit_before>import React, { Component } from 'react'
import Loader from '../Loader/Loader'
import { Link } from 'react-router'
import CatalogPreview from './CatalogPreview/CatalogPreview'
import LastHarvesting from '../LastHarvesting/LastHarvesting'
import { fetchMetrics } from '../../fetch/fetch'
import { waitForDataAndSetState, cancelAllPromises } from '../../helpers/components'
import { theme } from '../../tools'

const styles = {
  link: {
    cursor: 'pointer',
    margin: '1em 3em',
    display: 'inline-block',
    width: '300px',
    position: 'relative',
  },
  title: {
    fontSize: '1.4em',
  },
  paper: {
    backgroundColor: 'white',
    padding: '20px',
    boxShadow: theme.boxShadowZ1,
  },
  lastHarvesting: {
    fontSize: '0.8em',
  },
  catalogPreview: {
    marginTop: '1em',
  },
}

class Catalog extends Component {
  constructor(props) {
    super(props)
    this.state = {errors: []}
  }

  componentWillMount() {
    return waitForDataAndSetState(fetchMetrics(this.props.catalog.id), this, 'metrics')
  }

  componentWillUnmount() {
    return cancelAllPromises(this)
  }

  render() {
      const catalogPreview = <CatalogPreview style={styles.catalogPreview} metrics={this.state.metrics} />

      return (
          <Link to={`/catalogs/${this.props.catalog.id}`} style={styles.link}>
            <div style={styles.paper}>
              <div style={styles.title}>{this.props.catalog.name}</div>
              <LastHarvesting style={styles.lastHarvesting} harvest={this.props.catalog.lastHarvesting}/>
              <Loader value={this.state.metrics} component={catalogPreview}/>
            </div>
          </Link>
      )
  }
}

export default Catalog
<commit_msg>Slightly larger boxes<commit_after>import React, { Component } from 'react'
import Loader from '../Loader/Loader'
import { Link } from 'react-router'
import CatalogPreview from './CatalogPreview/CatalogPreview'
import LastHarvesting from '../LastHarvesting/LastHarvesting'
import { fetchMetrics } from '../../fetch/fetch'
import { waitForDataAndSetState, cancelAllPromises } from '../../helpers/components'
import { theme } from '../../tools'

const styles = {
  link: {
    cursor: 'pointer',
    margin: '1em 3em',
    display: 'inline-block',
    width: '300px',
    position: 'relative',
  },
  title: {
    fontSize: '1.4em',
  },
  paper: {
    backgroundColor: 'white',
    padding: '2em 20px',
    boxShadow: theme.boxShadowZ1,
  },
  lastHarvesting: {
    fontSize: '0.8em',
  },
  catalogPreview: {
    marginTop: '1em',
  },
}

class Catalog extends Component {
  constructor(props) {
    super(props)
    this.state = {errors: []}
  }

  componentWillMount() {
    return waitForDataAndSetState(fetchMetrics(this.props.catalog.id), this, 'metrics')
  }

  componentWillUnmount() {
    return cancelAllPromises(this)
  }

  render() {
      const catalogPreview = <CatalogPreview style={styles.catalogPreview} metrics={this.state.metrics} />

      return (
          <Link to={`/catalogs/${this.props.catalog.id}`} style={styles.link}>
            <div style={styles.paper}>
              <div style={styles.title}>{this.props.catalog.name}</div>
              <LastHarvesting style={styles.lastHarvesting} harvest={this.props.catalog.lastHarvesting}/>
              <Loader value={this.state.metrics} component={catalogPreview}/>
            </div>
          </Link>
      )
  }
}

export default Catalog

{'fraction_non_alphanumeric': 0.14953271028037382, 'fraction_numerical': 0.007885514018691588, 'mean_word_length': 3.087112171837709, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, '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': '5811167', 'n_tokens_mistral': 1064, 'n_tokens_neox': 1057, 'n_words': 213}