-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Hide Pex from bank options until it's implemented in ND #82836
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| import {useRoute} from '@react-navigation/native'; | ||
| import React, {useCallback, useMemo, useState} from 'react'; | ||
| import React, {useCallback, useEffect, useMemo, useState} from 'react'; | ||
| import {View} from 'react-native'; | ||
| import type {ValueOf} from 'type-fest'; | ||
| import FormHelpMessage from '@components/FormHelpMessage'; | ||
|
|
@@ -40,6 +40,13 @@ function SelectBankStep() { | |
| const [hasError, setHasError] = useState(false); | ||
| const isOtherBankSelected = bankSelected === CONST.COMPANY_CARDS.BANKS.OTHER; | ||
|
|
||
| useEffect(() => { | ||
| if (addNewCard?.data.selectedBank !== CONST.COMPANY_CARDS.BANKS.PEX) { | ||
| return; | ||
| } | ||
| setAddNewCompanyCardStepAndData({data: {selectedBank: null}}); | ||
| }, [addNewCard?.data.selectedBank]); | ||
|
|
||
| const submit = useCallback(() => { | ||
| if (!bankSelected) { | ||
| setHasError(true); | ||
|
|
@@ -70,6 +77,10 @@ function SelectBankStep() { | |
| if (bank === CONST.COMPANY_CARDS.BANKS.MOCK_BANK) { | ||
| return CONFIG.ENVIRONMENT !== CONST.ENVIRONMENT.PRODUCTION; | ||
| } | ||
| // Hide Pex option until it's fully supported in NewDot | ||
| if (bank === CONST.COMPANY_CARDS.BANKS.PEX) { | ||
| return false; | ||
|
Comment on lines
+81
to
+82
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Filtering Useful? React with 👍 / 👎.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @MelvinBot implement this suggestion.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Implemented in d5ac28e. Added a |
||
| } | ||
| return true; | ||
| }) | ||
| .map((bank) => ({ | ||
|
|
||
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.
Also add a comment explaining why we exclude PEX here please 🙌🏼