Skip to content

Commit

Permalink
Always display distance tab
Browse files Browse the repository at this point in the history
  • Loading branch information
neil-marcellini committed Nov 6, 2024
1 parent e0cd4db commit 692d250
Showing 1 changed file with 7 additions and 13 deletions.
20 changes: 7 additions & 13 deletions src/pages/iou/request/IOURequestStartPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,6 @@ function IOURequestStartPage({
IOU.initMoneyRequest(reportID, policy, isFromGlobalCreate, transaction?.iouRequestType, transactionRequestType);
}, [transaction, policy, reportID, iouType, isFromGlobalCreate, transactionRequestType, isLoadingSelectedTab]);

const isExpenseChat = ReportUtils.isPolicyExpenseChat(report);
const isExpenseReport = ReportUtils.isExpenseReport(report);
const shouldDisplayDistanceRequest = !!canUseCombinedTrackSubmit || isExpenseChat || isExpenseReport || (isFromGlobalCreate && iouType !== CONST.IOU.TYPE.SPLIT);

const navigateBack = () => {
Navigation.closeRHPFlow();
};
Expand Down Expand Up @@ -163,15 +159,13 @@ function IOURequestStartPage({
</TabScreenWithFocusTrapWrapper>
)}
</TopTab.Screen>
{shouldDisplayDistanceRequest && (
<TopTab.Screen name={CONST.TAB_REQUEST.DISTANCE}>
{() => (
<TabScreenWithFocusTrapWrapper>
<IOURequestStepDistance route={route} />
</TabScreenWithFocusTrapWrapper>
)}
</TopTab.Screen>
)}
<TopTab.Screen name={CONST.TAB_REQUEST.DISTANCE}>
{() => (
<TabScreenWithFocusTrapWrapper>
<IOURequestStepDistance route={route} />
</TabScreenWithFocusTrapWrapper>
)}
</TopTab.Screen>
</OnyxTabNavigator>
) : (
<FocusTrapContainerElement
Expand Down

0 comments on commit 692d250

Please sign in to comment.