Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Shahe Shahinyan committed Jan 26, 2024
1 parent 93a67bd commit 60ef074
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 2 additions & 4 deletions src/components/ReportActionItem/TaskView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@ function TaskView({report, policy, shouldShowHorizontalRule, ...props}: TaskView
}, [report]);

const taskTitle = convertToLTR(report.reportName ?? '');
// @ts-expect-error TODO: Remove this once OptionsListUtils (https://github.com/Expensify/App/issues/24921) is migrated to TypeScript.
const assigneeTooltipDetails = ReportUtils.getDisplayNamesWithTooltips(OptionsListUtils.getPersonalDetailsForAccountIDs([report.managerID], props.personalDetails), false);
const assigneeTooltipDetails = ReportUtils.getDisplayNamesWithTooltips(OptionsListUtils.getPersonalDetailsForAccountIDs(report.managerID ? [report.managerID] : [], props.personalDetails), false);
const isCompleted = ReportUtils.isCompletedTaskReport(report);
const isOpen = ReportUtils.isOpenTaskReport(report);
const canModifyTask = Task.canModifyTask(report, props.currentUserPersonalDetails.accountID, policy?.role);
Expand Down Expand Up @@ -157,8 +156,7 @@ function TaskView({report, policy, shouldShowHorizontalRule, ...props}: TaskView
<MenuItem
label={translate('task.assignee')}
title={ReportUtils.getDisplayNameForParticipant(report.managerID)}
// @ts-expect-error TODO: Remove this once OptionsListUtils (https://github.com/Expensify/App/issues/24921) is migrated to TypeScript.
icon={OptionsListUtils.getAvatarsForAccountIDs([report.managerID], personalDetails)}
icon={OptionsListUtils.getAvatarsForAccountIDs(report.managerID ? [report.managerID] : [], personalDetails)}
iconType={CONST.ICON_TYPE_AVATAR}
avatarSize={CONST.AVATAR_SIZE.SMALLER}
titleStyle={styles.assigneeTextStyle}
Expand Down
3 changes: 2 additions & 1 deletion src/types/utils/IconAsset.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type {ImageSourcePropType} from 'react-native';
import type {SvgProps} from 'react-native-svg/lib/typescript';
import type {Icon} from "@src/types/onyx/OnyxCommon";

type IconAsset = React.FC<SvgProps> | ImageSourcePropType;
type IconAsset = React.FC<SvgProps> | ImageSourcePropType | Icon[];

export default IconAsset;

0 comments on commit 60ef074

Please sign in to comment.