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/settings/ChangePasswordDialog.tsx | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'FrontEnd/src/views/settings/ChangePasswordDialog.tsx')

diff --git a/FrontEnd/src/views/settings/ChangePasswordDialog.tsx b/FrontEnd/src/views/settings/ChangePasswordDialog.tsx
index 944fdaed..fe5868e2 100644
--- a/FrontEnd/src/views/settings/ChangePasswordDialog.tsx
+++ b/FrontEnd/src/views/settings/ChangePasswordDialog.tsx
@@ -1,5 +1,5 @@
 import React, { useState } from "react";
-import { useHistory } from "react-router";
+import { useNavigate } from "react-router-dom";
 
 import { userService } from "@/services/user";
 
@@ -11,7 +11,7 @@ export interface ChangePasswordDialogProps {
 }
 
 const ChangePasswordDialog: React.FC<ChangePasswordDialogProps> = (props) => {
-  const history = useHistory();
+  const navigate = useNavigate();
 
   const [redirect, setRedirect] = useState<boolean>(false);
 
@@ -58,7 +58,7 @@ const ChangePasswordDialog: React.FC<ChangePasswordDialogProps> = (props) => {
       onClose={() => {
         props.close();
         if (redirect) {
-          history.push("/login");
+          navigate("/login");
         }
       }}
     />
-- 
cgit v1.2.3

