@@ -5,6 +5,7 @@ import RadioListItem from '@components/SelectionList/RadioListItem';
55import Text from '@components/Text' ;
66import useLocalize from '@hooks/useLocalize' ;
77import useOnyx from '@hooks/useOnyx' ;
8+ import useShowNotFoundPageInIOUStep from '@hooks/useShowNotFoundPageInIOUStep' ;
89import useThemeStyles from '@hooks/useThemeStyles' ;
910import { getIOURequestPolicyID , setMoneyRequestDistanceRate , setMoneyRequestTaxAmount , setMoneyRequestTaxRate , updateMoneyRequestDistanceRate } from '@libs/actions/IOU' ;
1011import { convertToBackendAmount } from '@libs/CurrencyUtils' ;
@@ -32,7 +33,7 @@ function IOURequestStepDistanceRate({
3233 report,
3334 reportDraft,
3435 route : {
35- params : { action, reportID, backTo, transactionID} ,
36+ params : { action, reportID, backTo, transactionID, iouType } ,
3637 } ,
3738 transaction,
3839} : IOURequestStepDistanceRateProps ) {
@@ -74,6 +75,8 @@ function IOURequestStepDistanceRate({
7475 isSelected,
7576 } ;
7677 } ) ;
78+ // eslint-disable-next-line rulesdir/no-negated-variables
79+ const shouldShowNotFoundPage = useShowNotFoundPageInIOUStep ( action , iouType , report , CONST . EDIT_REQUEST_FIELD . DISTANCE_RATE ) ;
7780
7881 const initiallyFocusedOption = sections . find ( ( item ) => item . isSelected ) ?. keyForList ;
7982
@@ -108,6 +111,7 @@ function IOURequestStepDistanceRate({
108111 onBackButtonPress = { navigateBack }
109112 shouldShowWrapper
110113 testID = { IOURequestStepDistanceRate . displayName }
114+ shouldShowNotFoundPage = { shouldShowNotFoundPage }
111115 >
112116 < Text style = { [ styles . mh5 , styles . mv4 ] } > { translate ( 'iou.chooseARate' ) } </ Text >
113117
0 commit comments