content: import React from 'react'
  import ReactDOM from 'react-dom'
  import { Provider } from 'react-redux'
  import { createStore, applyMiddleware } from 'redux'
  import { Router, browserHistory } from 'react-router'
  import thunkMiddleware from 'redux-thunk'
  import injectTapEventPlugin from 'react-tap-event-plugin'
  import reducers from './reducers'
  import routes from './routes'
  import cake from './cake'
  import './index.css'
  
  injectTapEventPlugin()
  
  const store = createStore(reducers, {
    songs: cake.songs.map(song =>
      Object.assign({}, song, {
        wins: 0,
        total: 0
      })
    ),
    showdown: {
      song1: null,
      song2: null
    }
  }, applyMiddleware(
    thunkMiddleware
  ))
  
  const onRouteUpdate = () => {
    // Reset scroll
    window.scrollTo(0, 0)
  
    // TODO: log page view
    // ReactGA
  }
  
  ReactDOM.render(
    <Provider store={store}>
      <Router history={browserHistory} routes={routes} onUpdate={onRouteUpdate} />
    </Provider>,
    document.getElementById('root')
  )
  