Skip to content

Commit 5034a80

Browse files
committed
fix disconnect flow
1 parent af9fa57 commit 5034a80

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/pages/workspace/hr/HRProviderCard.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import ActivityIndicator from '@components/ActivityIndicator';
44
import Button from '@components/Button';
55
import MenuItem from '@components/MenuItem';
66
import MenuItemWithTopDescription from '@components/MenuItemWithTopDescription';
7+
import {ModalActions} from '@components/Modal/Global/ModalContext';
78
import OfflineWithFeedback from '@components/OfflineWithFeedback';
89
import ThreeDotsMenu from '@components/ThreeDotsMenu';
910
import type ThreeDotsMenuProps from '@components/ThreeDotsMenu/types';
@@ -72,14 +73,13 @@ function HRProviderCard({card, policy, handleConnect}: HRProviderCardProps) {
7273
cancelText: translate('common.cancel'),
7374
danger: true,
7475
}).then((result) => {
75-
if (!result || !policy) {
76+
if (result?.action !== ModalActions.CONFIRM || !policy) {
7677
return;
7778
}
7879
removePolicyConnection(policy, card.connectionName);
7980
});
8081
},
8182
shouldCallAfterModalHide: true,
82-
disabled: isOffline,
8383
},
8484
];
8585

0 commit comments

Comments
 (0)