diff options
Diffstat (limited to 'vnext/src/components/SearchBox.js')
-rw-r--r-- | vnext/src/components/SearchBox.js | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/vnext/src/components/SearchBox.js b/vnext/src/components/SearchBox.js deleted file mode 100644 index a79100cd..00000000 --- a/vnext/src/components/SearchBox.js +++ /dev/null @@ -1,26 +0,0 @@ -import React from 'react'; -import PropTypes from 'prop-types'; -import ReactRouterPropTypes from 'react-router-prop-types'; -import { withRouter } from 'react-router-dom'; -import { useFormState } from 'react-use-form-state'; - -function SearchBox({ onSearch, history, pathname }) { - let onSubmit = (event) => { - event.preventDefault(); - onSearch(history, pathname, formState.values.search); - }; - const [formState, { text }] = useFormState(); - return ( - <form onSubmit={onSubmit}> - <input name="search" className="text" - placeholder="Search..." value={ formState.values.search } {...text('search')} /> - </form> - ); -} - -SearchBox.propTypes = { - pathname: PropTypes.string.isRequired, - onSearch: PropTypes.func.isRequired, - history: ReactRouterPropTypes.history.isRequired -}; -export default withRouter(SearchBox); |