From 34a857a41cd3ecf2cd1ac8c37eddd2ee4b41a82d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20M=C3=B3rawski?= Date: Wed, 24 Apr 2024 16:20:56 +0200 Subject: [PATCH 1/3] added missing padding --- src/pages/settings/Wallet/ReportCardLostPage.tsx | 13 ++++++++----- .../settings/Wallet/ReportVirtualCardFraudPage.tsx | 5 ++++- src/pages/settings/Wallet/TransferBalancePage.tsx | 3 +++ src/pages/tasks/NewTaskPage.tsx | 5 ++++- 4 files changed, 19 insertions(+), 7 deletions(-) diff --git a/src/pages/settings/Wallet/ReportCardLostPage.tsx b/src/pages/settings/Wallet/ReportCardLostPage.tsx index 0c5c0a5c9ff2..e8f1149779b0 100644 --- a/src/pages/settings/Wallet/ReportCardLostPage.tsx +++ b/src/pages/settings/Wallet/ReportCardLostPage.tsx @@ -11,6 +11,7 @@ import SingleOptionSelector from '@components/SingleOptionSelector'; import Text from '@components/Text'; import useLocalize from '@hooks/useLocalize'; import usePrevious from '@hooks/usePrevious'; +import useStyledSafeAreaInsets from '@hooks/useStyledSafeAreaInsets'; import useThemeStyles from '@hooks/useThemeStyles'; import * as CardUtils from '@libs/CardUtils'; import Navigation from '@libs/Navigation/Navigation'; @@ -94,6 +95,8 @@ function ReportCardLostPage({ const prevIsLoading = usePrevious(formData?.isLoading); + const {paddingBottom} = useStyledSafeAreaInsets(); + const formattedAddress = PersonalDetailsUtils.getFormattedAddress(privatePersonalDetails ?? {}); useEffect(() => { @@ -161,11 +164,11 @@ function ReportCardLostPage({ title={translate('reportCardLostOrDamaged.screenTitle')} onBackButtonPress={handleBackButtonPress} /> - + {isReasonConfirmed ? ( <> - {translate('reportCardLostOrDamaged.confirmAddressTitle')} + {translate('reportCardLostOrDamaged.confirmAddressTitle')} {isDamaged ? ( - {translate('reportCardLostOrDamaged.cardDamagedInfo')} + {translate('reportCardLostOrDamaged.cardDamagedInfo')} ) : ( - {translate('reportCardLostOrDamaged.cardLostOrStolenInfo')} + {translate('reportCardLostOrDamaged.cardLostOrStolenInfo')} )} ) : ( <> - + {translate('reportCardLostOrDamaged.reasonTitle')} card.nameValuePairs?.isVirtual); const virtualCardError = ErrorUtils.getLatestErrorMessage(virtualCard?.errors ?? {}); + const {paddingBottom} = useStyledSafeAreaInsets(); + const prevIsLoading = usePrevious(formData?.isLoading); useEffect(() => { @@ -70,7 +73,7 @@ function ReportVirtualCardFraudPage({ title={translate('reportFraudPage.title')} onBackButtonPress={() => Navigation.goBack(ROUTES.SETTINGS_WALLET_DOMAINCARD.getRoute(domain))} /> - + {translate('reportFraudPage.description')} diff --git a/src/pages/tasks/NewTaskPage.tsx b/src/pages/tasks/NewTaskPage.tsx index 44cb485c0b06..54e629236d0a 100644 --- a/src/pages/tasks/NewTaskPage.tsx +++ b/src/pages/tasks/NewTaskPage.tsx @@ -11,6 +11,7 @@ import MenuItemWithTopDescription from '@components/MenuItemWithTopDescription'; import ScreenWrapper from '@components/ScreenWrapper'; import ScrollView from '@components/ScrollView'; import useLocalize from '@hooks/useLocalize'; +import useStyledSafeAreaInsets from '@hooks/useStyledSafeAreaInsets'; import useThemeStyles from '@hooks/useThemeStyles'; import * as LocalePhoneNumber from '@libs/LocalePhoneNumber'; import Navigation from '@libs/Navigation/Navigation'; @@ -54,6 +55,8 @@ function NewTaskPage({task, reports, personalDetails}: NewTaskPageProps) { const isAllowedToCreateTask = useMemo(() => isEmptyObject(parentReport) || ReportUtils.isAllowedToComment(parentReport), [parentReport]); + const {paddingBottom} = useStyledSafeAreaInsets(); + useEffect(() => { setErrorMessage(''); @@ -191,7 +194,7 @@ function NewTaskPage({task, reports, personalDetails}: NewTaskPageProps) { onSubmit={onSubmit} enabledWhenOffline buttonText={translate('newTaskPage.confirmTask')} - containerStyles={[styles.mh0, styles.mt5, styles.flex1, styles.ph5]} + containerStyles={[styles.mh0, styles.mt5, styles.flex1, styles.ph5, !paddingBottom ? styles.mb5 : null]} /> From 04a41dc252e8213fdfc462367116631ec596e5d9 Mon Sep 17 00:00:00 2001 From: Michal Muzyk Date: Tue, 7 May 2024 10:29:38 +0200 Subject: [PATCH 2/3] fix: more padding fixes --- src/pages/settings/AboutPage/ConsolePage.tsx | 2 +- src/pages/settings/Wallet/ReportCardLostPage.tsx | 1 - src/pages/settings/Wallet/TransferBalancePage.tsx | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/pages/settings/AboutPage/ConsolePage.tsx b/src/pages/settings/AboutPage/ConsolePage.tsx index c9532fa041a0..132388365ada 100644 --- a/src/pages/settings/AboutPage/ConsolePage.tsx +++ b/src/pages/settings/AboutPage/ConsolePage.tsx @@ -154,7 +154,7 @@ function ConsolePage({capturedLogs, shouldStoreLogs}: ConsolePageProps) { success text={translate('initialSettingsPage.debugConsole.execute')} onPress={executeArbitraryCode} - style={[styles.mt5]} + style={[styles.mv5]} large /> diff --git a/src/pages/settings/Wallet/ReportCardLostPage.tsx b/src/pages/settings/Wallet/ReportCardLostPage.tsx index 76cf54454b71..11790bd44cb6 100644 --- a/src/pages/settings/Wallet/ReportCardLostPage.tsx +++ b/src/pages/settings/Wallet/ReportCardLostPage.tsx @@ -203,7 +203,6 @@ function ReportCardLostPage({ onSubmit={handleSubmitFirstStep} message="reportCardLostOrDamaged.reasonError" buttonText={translate('reportCardLostOrDamaged.nextButtonLabel')} - containerStyles={[styles.m5]} /> )} diff --git a/src/pages/settings/Wallet/TransferBalancePage.tsx b/src/pages/settings/Wallet/TransferBalancePage.tsx index 6f0e6ac016c7..c0f42fb9440d 100644 --- a/src/pages/settings/Wallet/TransferBalancePage.tsx +++ b/src/pages/settings/Wallet/TransferBalancePage.tsx @@ -219,7 +219,7 @@ function TransferBalancePage({bankAccountList, fundList, userWallet, walletTrans isDisabled={isButtonDisabled || isOffline} message={errorMessage} isAlertVisible={!isEmptyObject(errorMessage)} - containerStyles={!paddingBottom ? styles.pb5 : null} + containerStyles={[styles.ph5, !paddingBottom ? styles.pb5 : null]} /> From ddb7755e802eef8dbe14f2cff5a87a8765bf86a8 Mon Sep 17 00:00:00 2001 From: Michal Muzyk Date: Thu, 9 May 2024 10:06:37 +0200 Subject: [PATCH 3/3] fix: report virtual card fraud page fix --- src/pages/settings/Wallet/ReportVirtualCardFraudPage.tsx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/pages/settings/Wallet/ReportVirtualCardFraudPage.tsx b/src/pages/settings/Wallet/ReportVirtualCardFraudPage.tsx index 9368b36cf110..76f5f4c1bef3 100644 --- a/src/pages/settings/Wallet/ReportVirtualCardFraudPage.tsx +++ b/src/pages/settings/Wallet/ReportVirtualCardFraudPage.tsx @@ -9,7 +9,6 @@ import ScreenWrapper from '@components/ScreenWrapper'; import Text from '@components/Text'; import useLocalize from '@hooks/useLocalize'; import usePrevious from '@hooks/usePrevious'; -import useStyledSafeAreaInsets from '@hooks/useStyledSafeAreaInsets'; import useThemeStyles from '@hooks/useThemeStyles'; import * as ErrorUtils from '@libs/ErrorUtils'; import Navigation from '@libs/Navigation/Navigation'; @@ -46,8 +45,6 @@ function ReportVirtualCardFraudPage({ const virtualCard = cardList?.[cardID]; const virtualCardError = ErrorUtils.getLatestErrorMessage(virtualCard?.errors ?? {}); - const {paddingBottom} = useStyledSafeAreaInsets(); - const prevIsLoading = usePrevious(formData?.isLoading); useEffect(() => { @@ -71,7 +68,7 @@ function ReportVirtualCardFraudPage({ title={translate('reportFraudPage.title')} onBackButtonPress={() => Navigation.goBack(ROUTES.SETTINGS_WALLET_DOMAINCARD.getRoute(cardID))} /> - + {translate('reportFraudPage.description')}