From e9d40ade8554e39b648d16e58d636c6994e1ba73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivar=20Conradi=20=C3=98sthus?= Date: Mon, 10 May 2021 21:30:52 +0200 Subject: [PATCH] fix: hosted auth should not need to load inital data --- frontend/src/component/user/HostedAuth/HostedAuth.jsx | 4 +--- frontend/src/component/user/authentication-component.jsx | 1 - 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/frontend/src/component/user/HostedAuth/HostedAuth.jsx b/frontend/src/component/user/HostedAuth/HostedAuth.jsx index cfd5b7b578..662a2c66c1 100644 --- a/frontend/src/component/user/HostedAuth/HostedAuth.jsx +++ b/frontend/src/component/user/HostedAuth/HostedAuth.jsx @@ -10,7 +10,7 @@ import { Link } from 'react-router-dom'; import { GoogleSvg } from './Icons'; import useQueryParams from '../../../hooks/useQueryParams'; -const PasswordAuth = ({ authDetails, passwordLogin, loadInitialData }) => { +const PasswordAuth = ({ authDetails, passwordLogin }) => { const commonStyles = useCommonStyles(); const styles = useStyles(); const history = useHistory(); @@ -47,7 +47,6 @@ const PasswordAuth = ({ authDetails, passwordLogin, loadInitialData }) => { try { await passwordLogin(path, user); - await loadInitialData(); history.push(`/`); } catch (error) { if (error.statusCode === 404 || error.statusCode === 400) { @@ -153,7 +152,6 @@ const PasswordAuth = ({ authDetails, passwordLogin, loadInitialData }) => { PasswordAuth.propTypes = { authDetails: PropTypes.object.isRequired, passwordLogin: PropTypes.func.isRequired, - loadInitialData: PropTypes.func.isRequired, history: PropTypes.object.isRequired, }; diff --git a/frontend/src/component/user/authentication-component.jsx b/frontend/src/component/user/authentication-component.jsx index 53ec38c566..926d271bb6 100644 --- a/frontend/src/component/user/authentication-component.jsx +++ b/frontend/src/component/user/authentication-component.jsx @@ -54,7 +54,6 @@ class AuthComponent extends React.Component { );