aboutsummaryrefslogtreecommitdiff
path: root/vnext/src/ui/Login.js
diff options
context:
space:
mode:
Diffstat (limited to 'vnext/src/ui/Login.js')
-rw-r--r--vnext/src/ui/Login.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/vnext/src/ui/Login.js b/vnext/src/ui/Login.js
index fc3922c8..5a96c822 100644
--- a/vnext/src/ui/Login.js
+++ b/vnext/src/ui/Login.js
@@ -1,5 +1,5 @@
import { useEffect } from 'react';
-import { useLocation, useHistory } from 'react-router-dom';
+import { useLocation, useNavigate } from 'react-router-dom';
import Icon from './Icon';
import Button from './Button';
@@ -22,15 +22,15 @@ import './Login.css';
function Login({ visitor, onAuth }) {
const location = useLocation();
- const history = useHistory();
+ const navigate = useNavigate();
useEffect(() => {
if (visitor.hash) {
const {retpath } = location.state || '/';
console.log(retpath);
- history.push(retpath);
+ navigate(retpath);
}
- }, [history, location.state, visitor]);
+ }, [navigate, location.state, visitor]);
const { register, handleSubmit, formState: { errors }, } = useForm();