text: import React from 'react'
  import { Link } from 'react-router'
  import { connect } from 'react-redux'
  import { setSearchTerm } from './actionCreators'
  const { string, func, object } = React.PropTypes
  
  const Landing = React.createClass({
    contextTypes: {
      router: object
    },
    propTypes: {
      searchTerm: string,
      dispatch: func
    },
    handleSearchTermChange (event) {
      this.props.dispatch(setSearchTerm(event.target.value))
    },
    handleSearchSubmit (event) {
      event.preventDefault()
      this.context.router.transitionTo('/search')
    },
    render () {
      return (
        <div className='app'>
          <div className='landing'>
            <h1>Really Good Video Player</h1>
            <form onSubmit={this.handleSearchSubmit}>
              <input onChange={this.handleSearchTermChange} value={this.props.searchTerm} type='text' placeholder='Search' />
            </form>
            <Link to='/search'>or Browse All</Link>
          </div>
        </div>
      )
    }
  })
  
  const mapStateToProps = (state) => {
    return {
      searchTerm: state.searchTerm
    }
  }
  
  export default connect(mapStateToProps)(Landing)
  