Skip to content

Commit

Permalink
Merge pull request #46847 from s77rt/modal-onSelected-deploy-blocker
Browse files Browse the repository at this point in the history
[CP Staging] Wrap onSelected that opens another modal in Modal.close
  • Loading branch information
marcaaron authored Aug 6, 2024
2 parents a112217 + 72acd62 commit df23b20
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/pages/workspace/accounting/PolicyAccountingPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ import type {WithPolicyConnectionsProps} from '@pages/workspace/withPolicyConnec
import withPolicyConnections from '@pages/workspace/withPolicyConnections';
import type {AnchorPosition} from '@styles/index';
import {getTrackingCategories} from '@userActions/connections/ConnectToXero';
import * as Modal from '@userActions/Modal';
import CONST from '@src/CONST';
import ONYXKEYS from '@src/ONYXKEYS';
import ROUTES from '@src/ROUTES';
Expand Down Expand Up @@ -245,7 +246,7 @@ function PolicyAccountingPage({policy}: PolicyAccountingPageProps) {
{
icon: Expensicons.Trashcan,
text: translate('workspace.accounting.disconnect'),
onSelected: () => setIsDisconnectModalOpen(true),
onSelected: () => Modal.close(() => setIsDisconnectModalOpen(true)),
},
],
[translate, policyID, isOffline, connectedIntegration],
Expand Down

0 comments on commit df23b20

Please sign in to comment.