<commit_before>import React, { Component } from 'react'
import Radium from 'radium'
import ApiClient from 'helpers/ApiClient'
import mediaQueries from 'styles/common'
import { LoadingSpinner, NavBar, NotFound } from 'components'
import PosterCard from './PosterCard/PosterCard'

const client = new ApiClient()
const styles = {
  wrapper: {
    height: '100%',
    width: '100%'
  },
  container: {
    display: 'flex',
    alignItems: 'center',
    flexWrap: 'wrap',
    justifyContent: 'space-evenly',
    [mediaQueries.mediumUp]: {
      margin: '1em'
    }
  }
}

class PostersPage extends Component {
  componentDidMount() {
    client
      .get('/v1/repo/clubs/posters/metadata.json')
      .then(data => {
        this.setState({
          images: data.images
        })
      })
      .catch(e => {
        console.log(e)
        this.setState({ notFound: true })
      })
  }

  content() {
    const { notFound, images } = this.state

    if (notFound) {
      return <NotFound />
    } else if (images) {
      return (
        <div style={styles.container}>
          {images.map((image, i) => {
            return <PosterCard src={image} key={i} />
          })}
        </div>
      )
    } else {
      return <LoadingSpinner />
    }
  }

  render() {
    return (
      <div style={styles.wrapper}>
        <NavBar />
        {this.content()}
      </div>
    )
  }
}

export default Radium(PostersPage)<commit_msg>Add title to posters page<commit_after>import React, { Component } from 'react'
import Radium from 'radium'
import Helmet from 'react-helmet'
import ApiClient from 'helpers/ApiClient'
import mediaQueries from 'styles/common'
import { LoadingSpinner, NavBar, NotFound } from 'components'
import PosterCard from './PosterCard/PosterCard'

const client = new ApiClient()
const styles = {
  wrapper: {
    height: '100%',
    width: '100%'
  },
  container: {
    display: 'flex',
    alignItems: 'center',
    flexWrap: 'wrap',
    justifyContent: 'space-evenly',
    [mediaQueries.mediumUp]: {
      margin: '1em'
    }
  }
}

class PostersPage extends Component {
  componentDidMount() {
    client
      .get('/v1/repo/clubs/posters/metadata.json')
      .then(data => {
        this.setState({
          images: data.images
        })
      })
      .catch(e => {
        console.log(e)
        this.setState({ notFound: true })
      })
  }

  content() {
    const { notFound, images } = this.state

    if (notFound) {
      return <NotFound />
    } else if (images) {
      return (
        <div style={styles.container}>
          {images.map((image, i) => {
            return <PosterCard src={image} key={i} />
          })}
        </div>
      )
    } else {
      return <LoadingSpinner />
    }
  }

  render() {
    return (
      <div style={styles.wrapper}>
        <Helmet title="Posters" />
        <NavBar />
        {this.content()}
      </div>
    )
  }
}

export default Radium(PostersPage)
{'fraction_non_alphanumeric': 0.14159592529711376, 'fraction_numerical': 0.005432937181663837, 'mean_word_length': 2.2021739130434783, 'pattern_counts': {'":': 0, '<': 20, '<?xml version=': 0, '>': 26, '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': '4930523', 'n_tokens_mistral': 954, 'n_tokens_neox': 945, 'n_words': 211}