From 2d9ef25d6171890496b1c9dd48a91b11c40eca7c Mon Sep 17 00:00:00 2001
From: crupest <crupest@outlook.com>
Date: Mon, 6 Dec 2021 20:46:35 +0800
Subject: ...

---
 FrontEnd/src/views/home/index.tsx | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'FrontEnd/src/views/home/index.tsx')

diff --git a/FrontEnd/src/views/home/index.tsx b/FrontEnd/src/views/home/index.tsx
index 2e23654e..9533ea5a 100644
--- a/FrontEnd/src/views/home/index.tsx
+++ b/FrontEnd/src/views/home/index.tsx
@@ -1,5 +1,5 @@
 import React from "react";
-import { useHistory } from "react-router";
+import { useNavigate } from "react-router-dom";
 
 import { HttpTimelineInfo } from "@/http/timeline";
 import { getHttpHighlightClient } from "@/http/highlight";
@@ -17,7 +17,7 @@ const highlightTimelineMessageMap = {
 } as const;
 
 const HomeV2: React.FC = () => {
-  const history = useHistory();
+  const navigate = useNavigate();
 
   const [navText, setNavText] = React.useState<string>("");
 
@@ -60,7 +60,7 @@ const HomeV2: React.FC = () => {
         value={navText}
         onChange={setNavText}
         onButtonClick={() => {
-          history.push(`search?q=${navText}`);
+          navigate(`search?q=${navText}`);
         }}
         alwaysOneline
       />
-- 
cgit v1.2.3

