import 'babel-polyfill'

import React, { Component, PropTypes } from 'react'
import injectTapEventPlugin from 'react-tap-event-plugin'
import { Match } from 'react-router'

import Search from './containers/Search'
import Header from './containers/Header'
import Footer from './containers/Footer'

import { fullWhite } from 'material-ui/styles/colors'
import { getMuiTheme, MuiThemeProvider } from 'material-ui/styles'

// Needed for onTouchTap
// Can go away when react 1.0 release
// Check this repo:
// https://github.com/zilverline/react-tap-event-plugin
injectTapEventPlugin()

class App extends Component {

  constructor () {
    super()

    this.muiTheme = null
  }

  componentWillMount () {
    this.muiTheme = getMuiTheme({
      userAgent: this.props.userAgent,
      svgIcon: {
        color: fullWhite
      }
    })
  }

  render () {
    return (
      <MuiThemeProvider muiTheme={this.muiTheme}>
        <div className='buka'>
          <Header />
          <main className='buka__container'>
            <Match pattern='/' component={Search} />
          </main>
          <Footer />
        </div>
      </MuiThemeProvider>
    )
  }
}

App.propTypes = {
  userAgent: PropTypes.string.isRequired
}

export default App

@@ -37,19 +37,8 @@
 t, %7B
- Component,
  Pro
@@ -569,135 +569,48 @@
 )%0A%0Ac
-lass
+onst
  App 
-extends Component %7B%0A%0A  constructor () %7B%0A    super()%0A%0A    this.muiTheme = null%0A  %7D%0A%0A  componentWillMount () %7B%0A    this.
+= (%7B userAgent %7D) =%3E %7B%0A  const 
 muiT
@@ -634,18 +634,16 @@
 e(%7B%0A    
- 
- 
 userAgen
@@ -649,19 +649,8 @@
 nt: 
-this.props.
 user
@@ -660,18 +660,16 @@
 nt,%0A    
-  
 svgIcon:
@@ -671,18 +671,16 @@
 Icon: %7B%0A
-  
       co
@@ -698,44 +698,20 @@
 ite%0A
-  
     %7D%0A
-  
   %7D)%0A
-  %7D%0A%0A  render () %7B%0A  
+%0A
   re
@@ -717,18 +717,16 @@
 eturn (%0A
-  
     %3CMui
@@ -753,13 +753,8 @@
 me=%7B
-this.
 muiT
@@ -760,18 +760,16 @@
 Theme%7D%3E%0A
-  
       %3Cd
@@ -797,18 +797,16 @@
         
-  
 %3CHeader 
@@ -816,18 +816,16 @@
         
- 
- 
 %3Cmain cl
@@ -851,18 +851,16 @@
 ainer'%3E%0A
-  
         
@@ -910,18 +910,16 @@
         
-  
 %3C/main%3E%0A
@@ -926,18 +926,16 @@
         
- 
- 
 %3CFooter 
@@ -933,26 +933,24 @@
  %3CFooter /%3E%0A
-  
       %3C/div%3E
@@ -954,18 +954,16 @@
 iv%3E%0A    
-  
 %3C/MuiThe
@@ -980,15 +980,9 @@
 %3E%0A  
- 
- )%0A  %7D
+)
 %0A%7D%0A%0A

switch to stateless App component