diff --git a/src/public/js/components/navbar.js b/src/public/js/components/navbar.js index 6d410c5..5ed89bd 100644 --- a/src/public/js/components/navbar.js +++ b/src/public/js/components/navbar.js @@ -1,7 +1,6 @@ import React from 'react' import { Nav, Navbar, NavItem, NavDropdown, MenuItem } from 'react-bootstrap' import { LinkContainer } from 'react-router-bootstrap' -import { Control, Form } from 'react-redux-form'; export default function NavBar(props) { return ( @@ -19,20 +18,14 @@ export default function NavBar(props) { @@ -47,8 +40,9 @@ class Search extends React.Component { super(props); this.handleSearch = this.handleSearch.bind(this); } - handleSearch() { - this.props.router.push(`${this.props.path}/${encodeURI(this.props.search)}`); + handleSearch(ev) { + ev.preventDefault(); + this.props.router.push(`${this.props.path}/${encodeURI(this.input.value)}`); } isActive() { const location = this.props.router.getCurrentLocation().pathname; @@ -60,16 +54,15 @@ class Search extends React.Component { } return( - -
- + this.handleSearch(ev)}> + this.input = input} /> - -
+ + ); } } diff --git a/src/public/js/reducers/movies.js b/src/public/js/reducers/movies.js index d33dcd6..5d0bd69 100644 --- a/src/public/js/reducers/movies.js +++ b/src/public/js/reducers/movies.js @@ -7,7 +7,6 @@ const defaultState = { fetchingDetails: false, lastFetchUrl: "", exploreOptions: {}, - search: "", }; export default function movieStore(state = defaultState, action) { diff --git a/src/public/js/reducers/shows.js b/src/public/js/reducers/shows.js index e48a31d..f808770 100644 --- a/src/public/js/reducers/shows.js +++ b/src/public/js/reducers/shows.js @@ -7,7 +7,6 @@ const defaultState = { show: { seasons: [], }, - search: "", getDetails: false, lastShowsFetchUrl: "", exploreOptions: {},