From a118d72ff1ccecc9ef085a94a8393a108b1ab464 Mon Sep 17 00:00:00 2001 From: thelullabyy Date: Mon, 9 Jun 2025 18:26:17 +0700 Subject: [PATCH 1/2] fix: profile header is displayed with wrong format --- src/components/AccountSwitcher.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/AccountSwitcher.tsx b/src/components/AccountSwitcher.tsx index 59f74dcde6b8..9f9d6cc32bc6 100644 --- a/src/components/AccountSwitcher.tsx +++ b/src/components/AccountSwitcher.tsx @@ -12,6 +12,7 @@ import useWindowDimensions from '@hooks/useWindowDimensions'; import {clearDelegatorErrors, connect, disconnect} from '@libs/actions/Delegate'; import {close} from '@libs/actions/Modal'; import {getLatestError} from '@libs/ErrorUtils'; +import {formatPhoneNumber} from '@libs/LocalePhoneNumber'; import {getPersonalDetailByEmail} from '@libs/PersonalDetailsUtils'; import TextWithEmojiFragment from '@pages/home/report/comment/TextWithEmojiFragment'; import variables from '@styles/variables'; @@ -204,7 +205,7 @@ function AccountSwitcher({isScreenFocused}: AccountSwitcherProps) { numberOfLines={1} style={[styles.textBold, styles.textLarge, styles.flexShrink1, styles.lineHeightXLarge]} > - {displayName} + {formatPhoneNumber(displayName)} )} {!!canSwitchAccounts && ( @@ -222,7 +223,7 @@ function AccountSwitcher({isScreenFocused}: AccountSwitcherProps) { numberOfLines={1} style={[styles.colorMuted, styles.fontSizeLabel]} > - {Str.removeSMSDomain(currentUserPersonalDetails?.login ?? '')} + {formatPhoneNumber(currentUserPersonalDetails?.displayName ?? '')} {!!account?.isDebugModeEnabled && ( Date: Mon, 9 Jun 2025 18:45:06 +0700 Subject: [PATCH 2/2] update code --- src/components/AccountSwitcher.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/AccountSwitcher.tsx b/src/components/AccountSwitcher.tsx index 9f9d6cc32bc6..07c446cb7de1 100644 --- a/src/components/AccountSwitcher.tsx +++ b/src/components/AccountSwitcher.tsx @@ -223,7 +223,7 @@ function AccountSwitcher({isScreenFocused}: AccountSwitcherProps) { numberOfLines={1} style={[styles.colorMuted, styles.fontSizeLabel]} > - {formatPhoneNumber(currentUserPersonalDetails?.displayName ?? '')} + {Str.removeSMSDomain(currentUserPersonalDetails?.login ?? '')} {!!account?.isDebugModeEnabled && (