mirror of
https://github.com/Unleash/unleash.git
synced 2025-04-15 01:16:22 +02:00
fix: hosted auth should not need to load inital data
This commit is contained in:
parent
c9cd70e05b
commit
e9d40ade85
@ -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,
|
||||
};
|
||||
|
||||
|
@ -54,7 +54,6 @@ class AuthComponent extends React.Component {
|
||||
<HostedAuth
|
||||
passwordLogin={this.props.passwordLogin}
|
||||
authDetails={authDetails}
|
||||
loadInitialData={this.props.loadInitialData}
|
||||
history={this.props.history}
|
||||
/>
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user