-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Fix: Deleting workspace in connect bank account provides update currency error #21819
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 |
---|---|---|
|
@@ -31,6 +31,7 @@ import HeaderWithBackButton from '../../components/HeaderWithBackButton'; | |
import * as ReimbursementAccountProps from './reimbursementAccountPropTypes'; | ||
import reimbursementAccountDraftPropTypes from './ReimbursementAccountDraftPropTypes'; | ||
import withPolicy from '../workspace/withPolicy'; | ||
import FullPageNotFoundView from '../../components/BlockingViews/FullPageNotFoundView'; | ||
|
||
const propTypes = { | ||
/** Plaid SDK token to use to initialize the widget */ | ||
|
@@ -329,6 +330,18 @@ class ReimbursementAccountPage extends React.Component { | |
const currentStep = achData.currentStep || CONST.BANK_ACCOUNT.STEP.BANK_ACCOUNT; | ||
const policyName = lodashGet(this.props.policy, 'name'); | ||
|
||
if (_.isEmpty(this.props.policy)) { | ||
return ( | ||
<ScreenWrapper> | ||
<FullPageNotFoundView | ||
shouldShow | ||
onBackButtonPress={() => Navigation.navigate(ROUTES.SETTINGS_WORKSPACES)} | ||
shouldShowLink | ||
/> | ||
</ScreenWrapper> | ||
Comment on lines
+335
to
+341
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. NAB: we can update the 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. won't it more become like FullPageNotFoundView with an only diff of ScreenWrapper? |
||
); | ||
} | ||
|
||
const isLoading = this.props.isLoadingReportData || this.props.account.isLoading || this.props.reimbursementAccount.isLoading; | ||
|
||
// Prevent the full-page blocking offline view from being displayed for these steps if the device goes offline. | ||
|
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.
Coming from #23167:
This caused infinite loop when this page is opened from deeplink.
Navigation.goBack(ROUTES.SETTINGS_WORKSPACES)
is the correct approach.