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.js10
1 files changed, 4 insertions, 6 deletions
diff --git a/vnext/src/ui/SearchBox.js b/vnext/src/ui/SearchBox.js
index aab49757..dda97989 100644
--- a/vnext/src/ui/SearchBox.js
+++ b/vnext/src/ui/SearchBox.js
@@ -1,27 +1,25 @@
import React from 'react';
-import { withRouter } from 'react-router-dom';
import { useFormState } from 'react-use-form-state';
/**
* @typedef {Object} SearchBoxPropsFields
- * @property {string} pathname
* @property {function} onSearch
*/
/**
- * @typedef {import('react-router-dom').RouteComponentProps & SearchBoxPropsFields} SearchBoxProps
+ * @typedef {SearchBoxPropsFields} SearchBoxProps
*/
/**
* @param {SearchBoxProps} props
*/
-function SearchBox({ onSearch, history, pathname }) {
+function SearchBox({ onSearch }) {
/**
* @type {(React.FormEvent<HTMLFormElement>)}
*/
let onSubmit = (event) => {
event.preventDefault();
- onSearch(history, pathname, formState.values.search);
+ onSearch(formState.values.search);
};
const [formState, { text }] = useFormState();
return (
@@ -32,4 +30,4 @@ function SearchBox({ onSearch, history, pathname }) {
);
}
-export default withRouter(SearchBox);
+export default SearchBox;