import React, { PropTypes } from 'react' import { connect } from 'react-redux' import { Link, browserHistory } from 'react-router' import { createStore, bindActionCreators } from 'redux' import FontAwesome from 'react-fontawesome' import * as uiActions from '../services/ui/actions' import * as spotifyActions from '../services/spotify/actions' class SearchForm extends React.Component{ constructor(props) { super(props); this.state = { query: '' } } handleSubmit(e){ e.preventDefault(); browserHistory.push(global.baseURL+'search/'+this.state.query); return false } render(){ return (
) } } const mapStateToProps = (state, ownProps) => { return state; } const mapDispatchToProps = (dispatch) => { return { uiActions: bindActionCreators(uiActions, dispatch), spotifyActions: bindActionCreators(spotifyActions, dispatch) } } export default connect(mapStateToProps, mapDispatchToProps)(SearchForm)