From c53605371a6da410ce62b3b8aa8f767e1ad53918 Mon Sep 17 00:00:00 2001 From: dukenv0307 Date: Wed, 8 Nov 2023 15:23:16 +0700 Subject: [PATCH] clean function --- src/components/AmountTextInput.js | 1 + src/components/MagicCodeInput.js | 1 + .../ReportActionItem/MoneyRequestPreview.js | 11 +------ .../BankAccountManualStep.js | 2 ++ .../ReimbursementAccount/IdentityForm.js | 3 ++ .../ReimbursementAccount/ValidationStep.js | 3 ++ .../Profile/PersonalDetails/AddressPage.js | 4 +++ src/pages/settings/Wallet/AddDebitCardPage.js | 5 +++ .../reimburse/WorkspaceRateAndUnitPage.js | 1 + src/styles/StyleUtils.ts | 31 +++++++++---------- 10 files changed, 36 insertions(+), 26 deletions(-) diff --git a/src/components/AmountTextInput.js b/src/components/AmountTextInput.js index 43fd5e6a1b98..18d883c0be0e 100644 --- a/src/components/AmountTextInput.js +++ b/src/components/AmountTextInput.js @@ -41,6 +41,7 @@ const defaultProps = { function AmountTextInput(props) { return ( { inputRefs.current[index] = ref; // Setting attribute type to "search" to prevent Password Manager from appearing in Mobile Chrome diff --git a/src/components/ReportActionItem/MoneyRequestPreview.js b/src/components/ReportActionItem/MoneyRequestPreview.js index cb21ed179cc4..aa9d9d5c0070 100644 --- a/src/components/ReportActionItem/MoneyRequestPreview.js +++ b/src/components/ReportActionItem/MoneyRequestPreview.js @@ -31,7 +31,6 @@ import reportActionPropTypes from '@pages/home/report/reportActionPropTypes'; import styles from '@styles/styles'; import * as StyleUtils from '@styles/StyleUtils'; import themeColors from '@styles/themes/default'; -import variables from '@styles/variables'; import * as PaymentMethods from '@userActions/PaymentMethods'; import * as Report from '@userActions/Report'; import CONST from '@src/CONST'; @@ -293,15 +292,7 @@ function MoneyRequestPreview(props) { ) : ( 60: + // It is very rare for native devices to have a width smaller than 350px so add a constant subtract here + case widthDifference > 70: toSubtract = 11; break; - case widthDifferent > 50: + case widthDifference > 60: if (18 - numberOfAvatar * 2 < displayAmountLength) { toSubtract = numberOfAvatar * 2; } break; - case widthDifferent > 40: + case widthDifference > 50: if (18 - numberOfAvatar * 2 < displayAmountLength) { toSubtract = (numberOfAvatar - 1) * 2 + 1; } break; - case widthDifferent > 30: + case widthDifference > 40: if (20 - numberOfAvatar * 2 < displayAmountLength) { toSubtract = (numberOfAvatar - 1) * 2; } break; - case widthDifferent > 20: + case widthDifference > 30: if (20 - numberOfAvatar * 2 < displayAmountLength) { toSubtract = (numberOfAvatar - 1) * 2 - 1; } break; - case widthDifferent > 10: + case widthDifference > 20: if (20 - numberOfAvatar * 2 < displayAmountLength) { toSubtract = (numberOfAvatar - 2) * 2; }