From 2d346d65f2b7a4c6e13ceeede052d83fe629fa52 Mon Sep 17 00:00:00 2001 From: Carlos Martins Date: Thu, 14 Mar 2024 13:31:08 -0600 Subject: [PATCH] fix conditional --- src/components/MenuItem.tsx | 3 +-- src/pages/tasks/NewTaskPage.tsx | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/components/MenuItem.tsx b/src/components/MenuItem.tsx index ad425f6c017c..6835bcf3f5fc 100644 --- a/src/components/MenuItem.tsx +++ b/src/components/MenuItem.tsx @@ -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; @@ -374,7 +374,6 @@ function MenuItem( displayNamesWithTooltips={titleWithTooltips} tooltipEnabled numberOfLines={1} - shouldUseFullTitle={!!title} /> ); } diff --git a/src/pages/tasks/NewTaskPage.tsx b/src/pages/tasks/NewTaskPage.tsx index 64c46e75c91d..44cb485c0b06 100644 --- a/src/pages/tasks/NewTaskPage.tsx +++ b/src/pages/tasks/NewTaskPage.tsx @@ -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} />