Skip to content

Commit

Permalink
Merge pull request #15311 from Expensify/cristi_instantly-show-abraca…
Browse files Browse the repository at this point in the history
…dabra-page

Display loading spinner while authenticating from validate code link
  • Loading branch information
deetergp authored Mar 2, 2023
2 parents 434dbc2 + d267c3a commit 99d5741
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/pages/ValidateLoginPage/index.website.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,14 @@ class ValidateLoginPage extends Component {
isAuthenticated = () => Boolean(lodashGet(this.props, 'session.authToken', null));

/**
* Where SignIn was initiated on the current browser.
* Whether SignIn was initiated on the current browser.
* @returns {Boolean}
*/
isSignInInitiated = () => !this.isAuthenticated() && this.props.credentials && this.props.credentials.login;
isSignInInitiated = () => !this.isAuthenticated() && lodashGet(this.props, 'credentials.login', null);

render() {
return (
this.isOnPasswordlessBeta()
this.isOnPasswordlessBeta() && !this.isSignInInitiated() && !lodashGet(this.props, 'account.isLoading', true)
? (
<ValidateCodeModal
isSuccessfullySignedIn={this.state.justSignedIn}
Expand All @@ -109,8 +109,9 @@ ValidateLoginPage.defaultProps = defaultProps;
export default compose(
withLocalize,
withOnyx({
account: {key: ONYXKEYS.ACCOUNT},
betas: {key: ONYXKEYS.BETAS},
session: {key: ONYXKEYS.SESSION},
credentials: {key: ONYXKEYS.CREDENTIALS},
session: {key: ONYXKEYS.SESSION},
}),
)(ValidateLoginPage);

0 comments on commit 99d5741

Please sign in to comment.