-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #55278 from callstack-internal/fix/53996-wallet-it…
…s-not-here-error Add report fraud confirmation page when getting new virtual card
- Loading branch information
Showing
13 changed files
with
274 additions
and
8 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
74 changes: 74 additions & 0 deletions
74
src/pages/settings/Wallet/ReportVirtualCardFraudConfirmationPage.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
import React, {useCallback} from 'react'; | ||
import {View} from 'react-native'; | ||
import Button from '@components/Button'; | ||
import HeaderWithBackButton from '@components/HeaderWithBackButton'; | ||
import * as Expensicons from '@components/Icon/Expensicons'; | ||
import ImageSVG from '@components/ImageSVG'; | ||
import ScreenWrapper from '@components/ScreenWrapper'; | ||
import Text from '@components/Text'; | ||
import useLocalize from '@hooks/useLocalize'; | ||
import useThemeStyles from '@hooks/useThemeStyles'; | ||
import Navigation from '@navigation/Navigation'; | ||
import type {PlatformStackScreenProps} from '@navigation/PlatformStackNavigation/types'; | ||
import type {SettingsNavigatorParamList} from '@navigation/types'; | ||
import ROUTES from '@src/ROUTES'; | ||
import type SCREENS from '@src/SCREENS'; | ||
|
||
type ReportVirtualCardFraudConfirmationPageProps = PlatformStackScreenProps<SettingsNavigatorParamList, typeof SCREENS.SETTINGS.WALLET.REPORT_VIRTUAL_CARD_FRAUD_CONFIRMATION>; | ||
|
||
function ReportVirtualCardFraudConfirmationPage({ | ||
route: { | ||
params: {cardID = ''}, | ||
}, | ||
}: ReportVirtualCardFraudConfirmationPageProps) { | ||
const themeStyles = useThemeStyles(); | ||
const {translate} = useLocalize(); | ||
|
||
const close = useCallback(() => { | ||
Navigation.navigate(ROUTES.SETTINGS_WALLET_DOMAINCARD.getRoute(cardID)); | ||
}, [cardID]); | ||
|
||
return ( | ||
<ScreenWrapper | ||
includeSafeAreaPaddingBottom | ||
includePaddingTop | ||
shouldEnableMaxHeight | ||
testID={ReportVirtualCardFraudConfirmationPage.displayName} | ||
offlineIndicatorStyle={themeStyles.mtAuto} | ||
> | ||
<HeaderWithBackButton | ||
title={translate('reportFraudConfirmationPage.title')} | ||
onBackButtonPress={close} | ||
/> | ||
|
||
<View style={[themeStyles.ph5, themeStyles.mt3, themeStyles.mb5, themeStyles.flex1]}> | ||
<View style={[themeStyles.justifyContentCenter, themeStyles.flex1]}> | ||
<ImageSVG | ||
contentFit="contain" | ||
src={Expensicons.MagnifyingGlassSpyMouthClosed} | ||
style={themeStyles.alignSelfCenter} | ||
width={184} | ||
height={290} | ||
/> | ||
|
||
<Text style={[themeStyles.textHeadlineH1, themeStyles.alignSelfCenter, themeStyles.mt5]}>{translate('reportFraudConfirmationPage.title')}</Text> | ||
<Text style={[themeStyles.textSupporting, themeStyles.alignSelfCenter, themeStyles.mt2, themeStyles.textAlignCenter]}> | ||
{translate('reportFraudConfirmationPage.description')} | ||
</Text> | ||
</View> | ||
|
||
<Button | ||
text={translate('reportFraudConfirmationPage.buttonText')} | ||
onPress={close} | ||
style={themeStyles.justifyContentEnd} | ||
success | ||
large | ||
/> | ||
</View> | ||
</ScreenWrapper> | ||
); | ||
} | ||
|
||
ReportVirtualCardFraudConfirmationPage.displayName = 'ReportVirtualCardFraudConfirmationPage'; | ||
|
||
export default ReportVirtualCardFraudConfirmationPage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters