Skip to content

Commit

Permalink
Wrap onSelected that opens another modal in Modal.close
Browse files Browse the repository at this point in the history
  • Loading branch information
s77rt committed Aug 6, 2024
1 parent 0a17821 commit 72acd62
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 72acd62

Please sign in to comment.