mirror of
https://github.com/Unleash/unleash.git
synced 2025-04-24 01:18:01 +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 { GoogleSvg } from './Icons';
|
||||||
import useQueryParams from '../../../hooks/useQueryParams';
|
import useQueryParams from '../../../hooks/useQueryParams';
|
||||||
|
|
||||||
const PasswordAuth = ({ authDetails, passwordLogin, loadInitialData }) => {
|
const PasswordAuth = ({ authDetails, passwordLogin }) => {
|
||||||
const commonStyles = useCommonStyles();
|
const commonStyles = useCommonStyles();
|
||||||
const styles = useStyles();
|
const styles = useStyles();
|
||||||
const history = useHistory();
|
const history = useHistory();
|
||||||
@ -47,7 +47,6 @@ const PasswordAuth = ({ authDetails, passwordLogin, loadInitialData }) => {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
await passwordLogin(path, user);
|
await passwordLogin(path, user);
|
||||||
await loadInitialData();
|
|
||||||
history.push(`/`);
|
history.push(`/`);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (error.statusCode === 404 || error.statusCode === 400) {
|
if (error.statusCode === 404 || error.statusCode === 400) {
|
||||||
@ -153,7 +152,6 @@ const PasswordAuth = ({ authDetails, passwordLogin, loadInitialData }) => {
|
|||||||
PasswordAuth.propTypes = {
|
PasswordAuth.propTypes = {
|
||||||
authDetails: PropTypes.object.isRequired,
|
authDetails: PropTypes.object.isRequired,
|
||||||
passwordLogin: PropTypes.func.isRequired,
|
passwordLogin: PropTypes.func.isRequired,
|
||||||
loadInitialData: PropTypes.func.isRequired,
|
|
||||||
history: PropTypes.object.isRequired,
|
history: PropTypes.object.isRequired,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -54,7 +54,6 @@ class AuthComponent extends React.Component {
|
|||||||
<HostedAuth
|
<HostedAuth
|
||||||
passwordLogin={this.props.passwordLogin}
|
passwordLogin={this.props.passwordLogin}
|
||||||
authDetails={authDetails}
|
authDetails={authDetails}
|
||||||
loadInitialData={this.props.loadInitialData}
|
|
||||||
history={this.props.history}
|
history={this.props.history}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user