Skip to content

Commit

Permalink
fix conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
luacmartins committed Mar 14, 2024
1 parent 7b0dcee commit 2d346d6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/components/MenuItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ type MenuItemBaseProps = {
onSecondaryInteraction?: (event: GestureResponderEvent | MouseEvent) => void;

/** Array of objects that map display names to their corresponding tooltip */
titleWithTooltips?: DisplayNameWithTooltip[];
titleWithTooltips?: DisplayNameWithTooltip[] | undefined;

/** Icon should be displayed in its own color */
displayInDefaultIconColor?: boolean;
Expand Down Expand Up @@ -374,7 +374,6 @@ function MenuItem(
displayNamesWithTooltips={titleWithTooltips}
tooltipEnabled
numberOfLines={1}
shouldUseFullTitle={!!title}
/>
);
}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/tasks/NewTaskPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ function NewTaskPage({task, reports, personalDetails}: NewTaskPageProps) {
onPress={() => Navigation.navigate(ROUTES.NEW_TASK_SHARE_DESTINATION)}
interactive={!task?.parentReportID}
shouldShowRightIcon={!task?.parentReportID}
titleWithTooltips={shareDestination?.shouldUseFullTitleToDisplay ? shareDestination?.displayNamesWithTooltips : []}
titleWithTooltips={shareDestination?.shouldUseFullTitleToDisplay ? undefined : shareDestination?.displayNamesWithTooltips}
/>
</View>
</View>
Expand Down

0 comments on commit 2d346d6

Please sign in to comment.