Skip to content

Commit

Permalink
Merge pull request #15606 from Expensify/revert-15604-revert-15351-ju…
Browse files Browse the repository at this point in the history
…les-fixAndAlignSMSSuffix

[No QA] Revert "Revert "Fix miss-matched SMS email suffix on sign in page""
  • Loading branch information
roryabraham authored Mar 2, 2023
2 parents 99d5741 + c1acd52 commit 84e37e6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 1 addition & 3 deletions src/pages/signin/ChangeExpensifyLoginLink.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@ const ChangeExpensifyLoginLink = props => (
<Text>
{props.translate('common.not')}
&nbsp;
{Str.isSMSLogin(props.credentials.login || '')
? props.toLocalPhone(Str.removeSMSDomain(props.credentials.login || ''))
: Str.removeSMSDomain(props.credentials.login || '')}
{Str.removeSMSDomain(props.credentials.login)}
{'? '}
</Text>
)}
Expand Down
6 changes: 4 additions & 2 deletions src/pages/signin/SignInPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
} from 'react-native';
import PropTypes from 'prop-types';
import {withOnyx} from 'react-native-onyx';
import Str from 'expensify-common/lib/str';
import ONYXKEYS from '../../ONYXKEYS';
import styles from '../../styles/styles';
import compose from '../../libs/compose';
Expand Down Expand Up @@ -91,9 +92,10 @@ class SignInPage extends Component {
// We will only know this after a user signs in successfully, without their 2FA code
welcomeText = this.props.translate('validateCodeForm.enterAuthenticatorCode');
} else {
const userLogin = Str.removeSMSDomain(this.props.credentials.login);
welcomeText = this.props.account.validated
? this.props.translate('welcomeText.welcomeBackEnterMagicCode', {login: this.props.credentials.login})
: this.props.translate('welcomeText.welcomeEnterMagicCode', {login: this.props.credentials.login});
? this.props.translate('welcomeText.welcomeBackEnterMagicCode', {login: userLogin})
: this.props.translate('welcomeText.welcomeEnterMagicCode', {login: userLogin});
}
} else if (showPasswordForm) {
welcomeText = this.props.translate('welcomeText.welcomeBack');
Expand Down

0 comments on commit 84e37e6

Please sign in to comment.