<commit_before>import React from 'react'
import { render } from 'react-dom'
import { BrowserRouter, Match } from 'react-router'
import Landing from './Landing'
import Search from './Search'
import '../public/normalize.css'
import '../public/style.css'

const App = React.createClass({
  render () {
    return (
        <BrowserRouter>
            <div className='app'>

                <Match exactly pattern='/' component={Landing}></Match>
                <Match pattern='/search' component={Search}></Match>
            </div>
        </BrowserRouter>
      )
  }
})

render(<App />, document.getElementById('app'))
<commit_msg>update 'router' to pass props to Details component<commit_after>import React from 'react'
import { render } from 'react-dom'
import { BrowserRouter, Match } from 'react-router'
import Landing from './Landing'
import Search from './Search'
import Details from './Details'
import '../public/normalize.css'
import '../public/style.css'
import preload from '../public/data.json'

const App = React.createClass({
  render () {
    return (
        <BrowserRouter>
            <div className='app'>

                <Match exactly pattern='/' component={Landing} />
                <Match
                  pattern='/search'
                  component={(props) => <Search shows={preload.shows} {...props} />} />
                <Match
                  pattern='/details/:id'
                  component={(props) => {
                      <pre>
                        <code> 
                            {JSON.stringify(props)}
                        </code>
                      </pre>
                      const shows = preload.shows.filter((show) => props.params.id === show.imdbID)

                      return <Details show={shows[0]} {...props} />
                    }} />
            </div>
        </BrowserRouter>
      )
  }
})

render(<App />, document.getElementById('app'))

{'fraction_non_alphanumeric': 0.14679854242581988, 'fraction_numerical': 0.0005205622071837585, 'mean_word_length': 1.7895500725689404, 'pattern_counts': {'":': 0, '<': 26, '<?xml version=': 0, '>': 29, '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': '2919770', 'n_tokens_mistral': 516, 'n_tokens_neox': 492, 'n_words': 123}