From 26261cba10a337698a05965f2af086d3fd489237 Mon Sep 17 00:00:00 2001 From: I Nyoman Jyotisa Date: Fri, 29 Nov 2024 11:39:13 +0800 Subject: [PATCH 1/2] Fix: SMS delivery failure sign in flow in homepage --- src/pages/signin/SMSDeliveryFailurePage.tsx | 2 +- src/pages/signin/SignInPage.tsx | 2 +- src/types/onyx/Account.ts | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pages/signin/SMSDeliveryFailurePage.tsx b/src/pages/signin/SMSDeliveryFailurePage.tsx index 86f4f9959d8b..cb9c7674d60e 100644 --- a/src/pages/signin/SMSDeliveryFailurePage.tsx +++ b/src/pages/signin/SMSDeliveryFailurePage.tsx @@ -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) { diff --git a/src/pages/signin/SignInPage.tsx b/src/pages/signin/SignInPage.tsx index ce16bf0cd823..e99b2c1d7fca 100644 --- a/src/pages/signin/SignInPage.tsx +++ b/src/pages/signin/SignInPage.tsx @@ -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; diff --git a/src/types/onyx/Account.ts b/src/types/onyx/Account.ts index 0337359e45b2..26436af5b48f 100644 --- a/src/types/onyx/Account.ts +++ b/src/types/onyx/Account.ts @@ -61,7 +61,7 @@ type DelegatedAccess = { }; /** Model of SMS delivery failure status */ -type SMSDeliveryFailureStatus = { +type smsDeliveryFailureStatus = { /** Whether the account is having trouble receiving SMS */ hasSMSDeliveryFailure: boolean; @@ -156,7 +156,7 @@ type Account = { delegatedAccess?: DelegatedAccess; /** Indicates SMS delivery failure status and associated information */ - SMSDeliveryFailureStatus?: SMSDeliveryFailureStatus; + smsDeliveryFailureStatus?: smsDeliveryFailureStatus; }; export default Account; From 15182a84e16a85f73774270a17d773d8c555fda1 Mon Sep 17 00:00:00 2001 From: I Nyoman Jyotisa Date: Fri, 29 Nov 2024 13:50:33 +0800 Subject: [PATCH 2/2] minor fix --- src/types/onyx/Account.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/types/onyx/Account.ts b/src/types/onyx/Account.ts index 26436af5b48f..ea084b532793 100644 --- a/src/types/onyx/Account.ts +++ b/src/types/onyx/Account.ts @@ -61,7 +61,7 @@ type DelegatedAccess = { }; /** Model of SMS delivery failure status */ -type smsDeliveryFailureStatus = { +type SMSDeliveryFailureStatus = { /** Whether the account is having trouble receiving SMS */ hasSMSDeliveryFailure: boolean; @@ -156,7 +156,7 @@ type Account = { delegatedAccess?: DelegatedAccess; /** Indicates SMS delivery failure status and associated information */ - smsDeliveryFailureStatus?: smsDeliveryFailureStatus; + smsDeliveryFailureStatus?: SMSDeliveryFailureStatus; }; export default Account;