Skip to content

Commit

Permalink
Merge pull request #32916 from Pujan92/fix/32911
Browse files Browse the repository at this point in the history
Fix: Compose-Tapping on request money deep link app crashes
(cherry picked from commit 5931d8c)
  • Loading branch information
Julesssss authored and OSBotify committed Dec 12, 2023
1 parent 89b5415 commit e9bb7cc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions src/pages/iou/MoneyRequestSelectorPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const propTypes = {
};

const defaultProps = {
selectedTab: CONST.TAB.SCAN,
selectedTab: CONST.TAB_REQUEST.SCAN,
report: {},
};

Expand Down Expand Up @@ -100,7 +100,7 @@ function MoneyRequestSelectorPage(props) {
{({safeAreaPaddingBottomStyle}) => (
<FullPageNotFoundView shouldShow={!IOUUtils.isValidMoneyRequestType(iouType) || !isAllowedToCreateRequest}>
<DragAndDropProvider
isDisabled={props.selectedTab !== CONST.TAB.SCAN}
isDisabled={props.selectedTab !== CONST.TAB_REQUEST.SCAN}
setIsDraggingOver={setIsDraggingOver}
>
<View style={[styles.flex1, safeAreaPaddingBottomStyle]}>
Expand All @@ -121,18 +121,18 @@ function MoneyRequestSelectorPage(props) {
)}
>
<TopTab.Screen
name={CONST.TAB.MANUAL}
name={CONST.TAB_REQUEST.MANUAL}
component={NewRequestAmountPage}
initialParams={{reportID, iouType}}
/>
<TopTab.Screen
name={CONST.TAB.SCAN}
name={CONST.TAB_REQUEST.SCAN}
component={ReceiptSelector}
initialParams={{reportID, iouType, pageIndex: 1}}
/>
{shouldDisplayDistanceRequest && (
<TopTab.Screen
name={CONST.TAB.DISTANCE}
name={CONST.TAB_REQUEST.DISTANCE}
component={NewDistanceRequestPage}
initialParams={{reportID, iouType}}
/>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/iou/steps/MoneyRequestAmountForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const defaultProps = {
currency: CONST.CURRENCY.USD,
forwardedRef: null,
isEditing: false,
selectedTab: CONST.TAB.MANUAL,
selectedTab: CONST.TAB_REQUEST.MANUAL,
};

/**
Expand Down
2 changes: 1 addition & 1 deletion src/pages/iou/steps/MoneyRequestConfirmPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ function MoneyRequestConfirmPage(props) {
[props.iou.participants, personalDetails],
);
const isPolicyExpenseChat = useMemo(() => ReportUtils.isPolicyExpenseChat(ReportUtils.getRootParentReport(props.report)), [props.report]);
const isManualRequestDM = props.selectedTab === CONST.TAB.MANUAL && iouType === CONST.IOU.TYPE.REQUEST;
const isManualRequestDM = props.selectedTab === CONST.TAB_REQUEST.MANUAL && iouType === CONST.IOU.TYPE.REQUEST;

useEffect(() => {
const policyExpenseChat = _.find(participants, (participant) => participant.isPolicyExpenseChat);
Expand Down

0 comments on commit e9bb7cc

Please sign in to comment.