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.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/vnext/src/ui/Login.js b/vnext/src/ui/Login.js
index 883a4eab..0c6f5d0c 100644
--- a/vnext/src/ui/Login.js
+++ b/vnext/src/ui/Login.js
@@ -1,6 +1,5 @@
import React, { useEffect } from 'react';
-
-import { withRouter } from 'react-router-dom';
+import { useLocation, useHistory } from 'react-router-dom';
import Icon from './Icon';
import Button from './Button';
@@ -14,8 +13,6 @@ import './Login.css';
/**
* @typedef {Object} LoginProps
* @property {import('../api').SecureUser} visitor
- * @property {import('history').History} history
- * @property {import('history').Location} location
* @property {any} onAuth
*/
@@ -23,7 +20,10 @@ import './Login.css';
* Login page
* @param {LoginProps} props
*/
-function Login({ visitor, history, location, onAuth }) {
+function Login({ visitor, onAuth }) {
+
+ const location = useLocation();
+ const history = useHistory();
useEffect(() => {
if (visitor.hash) {
@@ -76,7 +76,7 @@ function Login({ visitor, history, location, onAuth }) {
);
}
-export default withRouter(Login);
+export default Login;
const socialButtonsStyle = {
display: 'flex',