-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add report fraud confirmation page when getting new virtual card #55278
Merged
mountiny
merged 25 commits into
Expensify:main
from
callstack-internal:fix/53996-wallet-its-not-here-error
Jan 29, 2025
Merged
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
5029dd3
basic fraud report confirmation modal added
burczu 5ac68f4
navigation back + preventing showing 404 page
burczu f8a76ad
Merge branch 'main' into fix/53996-wallet-its-not-here-error
burczu 01c94a4
modal content and styles added
burczu f6c1c27
unnecessary condition removed
burczu 3d65b28
linter errors fixed
burczu 3148d2d
another linter error fixed
burczu 6d8ae98
Merge branch 'main' into fix/53996-wallet-its-not-here-error
burczu 97951e0
cherry pick from other PR
burczu 6f3bb57
adjustments after cherry pick
burczu 533fd17
unnecessary commented line removed
burczu f2856c7
storing previous virtual card fixed
burczu 8d32b27
translations introduced
burczu f7f1630
jamiegpt translations added
burczu 4f285fc
modal title translated
burczu b7bbab5
Merge branch 'main' into fix/53996-wallet-its-not-here-error
burczu d469ca4
Merge branch 'main' into fix/53996-wallet-its-not-here-error
burczu 7ac64e0
Merge branch 'main' into fix/53996-wallet-its-not-here-error
burczu bcee6ae
navigate as an side effect to fix behaviour on mobile
burczu abb7f9c
Merge branch 'main' into fix/53996-wallet-its-not-here-error
burczu d197b71
unnecessary props removed
burczu e69eac5
Merge branch 'main' into fix/53996-wallet-its-not-here-error
burczu e8bbcaa
switched from confirmation modal to standalone page
burczu 6fc26fc
eslint fix
burczu 2cecae4
redirecting to fixed page from card details page fixing redirect loop
burczu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commenting for reference: This changes caused regression #56026