aboutsummaryrefslogtreecommitdiff
path: root/vnext/src/ui/Header.js
diff options
context:
space:
mode:
Diffstat (limited to 'vnext/src/ui/Header.js')
-rw-r--r--vnext/src/ui/Header.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/vnext/src/ui/Header.js b/vnext/src/ui/Header.js
index 1574a489..3162c9ea 100644
--- a/vnext/src/ui/Header.js
+++ b/vnext/src/ui/Header.js
@@ -1,12 +1,12 @@
import { memo, useCallback } from 'react';
-import { Link, useHistory } from 'react-router-dom';
+import { Link, useNavigate } from 'react-router-dom';
import Icon from './Icon';
import { UserLink } from './UserInfo';
import SearchBox from './SearchBox';
function Header({ visitor, className }) {
- const history = useHistory();
+ const navigate = useNavigate();
/**
* @param {string} searchString
*/
@@ -14,8 +14,8 @@ function Header({ visitor, className }) {
let location = {};
location.pathname = '/discover';
location.search = `?search=${searchString}`;
- history.push(location);
- }, [history]);
+ navigate(location);
+ }, [navigate]);
return (
<div id="header" className={className}>
<div id="header_wrapper">