Skip to content

Commit

Permalink
Wrap assignee menu item with OfflineWithFeedback
Browse files Browse the repository at this point in the history
  • Loading branch information
neonbhai committed Feb 7, 2024
1 parent f978aac commit 99d56db
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions src/components/ReportActionItem/TaskView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@ function TaskView({report, shouldShowHorizontalRule, ...props}: TaskViewProps) {
interactive={!isDisableInteractive}
/>
</OfflineWithFeedback>
{report.managerID ? (
<OfflineWithFeedback pendingAction={report.pendingFields?.managerID}>
<OfflineWithFeedback pendingAction={report.pendingFields?.managerID}>
{report.managerID ? (
<MenuItem
label={translate('task.assignee')}
title={ReportUtils.getDisplayNameForParticipant(report.managerID)}
Expand All @@ -169,18 +169,18 @@ function TaskView({report, shouldShowHorizontalRule, ...props}: TaskViewProps) {
interactive={!isDisableInteractive}
titleWithTooltips={assigneeTooltipDetails}
/>
</OfflineWithFeedback>
) : (
<MenuItemWithTopDescription
description={translate('task.assignee')}
onPress={() => Navigation.navigate(ROUTES.TASK_ASSIGNEE.getRoute(report.reportID))}
shouldShowRightIcon={isOpen}
disabled={disableState}
wrapperStyle={[styles.pv2]}
shouldGreyOutWhenDisabled={false}
interactive={!isDisableInteractive}
/>
)}
) : (
<MenuItemWithTopDescription
description={translate('task.assignee')}
onPress={() => Navigation.navigate(ROUTES.TASK_ASSIGNEE.getRoute(report.reportID))}
shouldShowRightIcon={isOpen}
disabled={disableState}
wrapperStyle={[styles.pv2]}
shouldGreyOutWhenDisabled={false}
interactive={!isDisableInteractive}
/>
)}
</OfflineWithFeedback>
</OfflineWithFeedback>
<SpacerView
shouldShow={shouldShowHorizontalRule}
Expand Down

0 comments on commit 99d56db

Please sign in to comment.