aboutsummaryrefslogtreecommitdiff
path: root/vnext/src/ui/SearchBox.js
diff options
context:
space:
mode:
Diffstat (limited to 'vnext/src/ui/SearchBox.js')
-rw-r--r--vnext/src/ui/SearchBox.js12
1 files changed, 4 insertions, 8 deletions
diff --git a/vnext/src/ui/SearchBox.js b/vnext/src/ui/SearchBox.js
index a79100cd..3f0b884b 100644
--- a/vnext/src/ui/SearchBox.js
+++ b/vnext/src/ui/SearchBox.js
@@ -1,9 +1,10 @@
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';
+/**
+ * @param {{ pathname: string, onSearch: function, history: import('history').History }} props
+ */
function SearchBox({ onSearch, history, pathname }) {
let onSubmit = (event) => {
event.preventDefault();
@@ -13,14 +14,9 @@ function SearchBox({ onSearch, history, pathname }) {
return (
<form onSubmit={onSubmit}>
<input name="search" className="text"
- placeholder="Search..." value={ formState.values.search } {...text('search')} />
+ 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);