Skip to content

Commit

Permalink
Fix: SMS delivery failure sign in flow in homepage
Browse files Browse the repository at this point in the history
  • Loading branch information
nyomanjyotisa committed Nov 29, 2024
1 parent 03639a9 commit 26261cb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/pages/signin/SMSDeliveryFailurePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function SMSDeliveryFailurePage() {
return Str.isSMSLogin(credentials.login) ? Str.removeSMSDomain(credentials.login) : credentials.login;
}, [credentials?.login]);

const SMSDeliveryFailureMessage = account?.SMSDeliveryFailureStatus?.message;
const SMSDeliveryFailureMessage = account?.smsDeliveryFailureStatus?.message;

useEffect(() => {
if (!isKeyboardShown) {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/signin/SignInPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ function getRenderOptions({
const isSAMLEnabled = !!account?.isSAMLEnabled;
const isSAMLRequired = !!account?.isSAMLRequired;
const hasEmailDeliveryFailure = !!account?.hasEmailDeliveryFailure;
const hasSMSDeliveryFailure = !!account?.SMSDeliveryFailureStatus?.hasSMSDeliveryFailure;
const hasSMSDeliveryFailure = !!account?.smsDeliveryFailureStatus?.hasSMSDeliveryFailure;

// True, if the user has SAML required, and we haven't yet initiated SAML for their account
const shouldInitiateSAMLLogin = hasAccount && hasLogin && isSAMLRequired && !hasInitiatedSAMLLogin && !!account.isLoading;
Expand Down
4 changes: 2 additions & 2 deletions src/types/onyx/Account.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ type DelegatedAccess = {
};

/** Model of SMS delivery failure status */
type SMSDeliveryFailureStatus = {
type smsDeliveryFailureStatus = {

Check failure on line 64 in src/types/onyx/Account.ts

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Type Alias name `smsDeliveryFailureStatus` must match one of the following formats: PascalCase

Check failure on line 64 in src/types/onyx/Account.ts

View workflow job for this annotation

GitHub Actions / ESLint check

Type Alias name `smsDeliveryFailureStatus` must match one of the following formats: PascalCase
/** Whether the account is having trouble receiving SMS */
hasSMSDeliveryFailure: boolean;

Expand Down Expand Up @@ -156,7 +156,7 @@ type Account = {
delegatedAccess?: DelegatedAccess;

/** Indicates SMS delivery failure status and associated information */
SMSDeliveryFailureStatus?: SMSDeliveryFailureStatus;
smsDeliveryFailureStatus?: smsDeliveryFailureStatus;
};

export default Account;
Expand Down

0 comments on commit 26261cb

Please sign in to comment.