Skip to content

Commit

Permalink
fix: use isActionOfType
Browse files Browse the repository at this point in the history
  • Loading branch information
daledah committed Sep 30, 2024
1 parent b2a817a commit 12b3e38
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/pages/home/report/ContextMenu/ContextMenuActions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ const ContextMenuActions: ContextMenuAction[] = [
setClipboardMessage(Localize.translateLocal('report.actions.type.integrationSyncFailed', {label, errorMessage}));
} else if (ReportActionsUtils.isCardIssuedAction(reportAction)) {
setClipboardMessage(ReportActionsUtils.getCardIssuedMessage(reportAction, true));
} else if (reportAction?.actionName === CONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG.DELETE_INTEGRATION) {
} else if (ReportActionsUtils.isActionOfType(action, CONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG.DELETE_INTEGRATION)) {

Check failure on line 481 in src/pages/home/report/ContextMenu/ContextMenuActions.tsx

View workflow job for this annotation

GitHub Actions / typecheck

Cannot find name 'action'.

Check failure on line 481 in src/pages/home/report/ContextMenu/ContextMenuActions.tsx

View workflow job for this annotation

GitHub Actions / ESLint check

Unsafe argument of type `any` assigned to a parameter of type `OnyxInputOrEntry<ReportAction>`

Check failure on line 481 in src/pages/home/report/ContextMenu/ContextMenuActions.tsx

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Unsafe argument of type `any` assigned to a parameter of type `OnyxInputOrEntry<ReportAction>`
setClipboardMessage(ReportActionsUtils.getRemovedConnectionMessage(reportAction));
} else if (content) {
setClipboardMessage(
Expand Down
2 changes: 1 addition & 1 deletion src/pages/home/report/ReportActionItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,7 @@ function ReportActionItem({
} else if (ReportActionsUtils.isActionOfType(action, CONST.REPORT.ACTIONS.TYPE.INTEGRATION_SYNC_FAILED)) {
const {label, errorMessage} = ReportActionsUtils.getOriginalMessage(action) ?? {label: '', errorMessage: ''};
children = <ReportActionItemBasicMessage message={translate('report.actions.type.integrationSyncFailed', {label, errorMessage})} />;
} else if (action.actionName === CONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG.DELETE_INTEGRATION) {
} else if (ReportActionsUtils.isActionOfType(action, CONST.REPORT.ACTIONS.TYPE.POLICY_CHANGE_LOG.DELETE_INTEGRATION)) {
children = <ReportActionItemBasicMessage message={ReportActionsUtils.getRemovedConnectionMessage(action)} />;
} else {
const hasBeenFlagged =
Expand Down

0 comments on commit 12b3e38

Please sign in to comment.