1+ import { usePersonalDetails } from '@components/OnyxListItemProvider' ;
12import PrevNextButtons from '@components/PrevNextButtons' ;
23import Text from '@components/Text' ;
34import { useWideRHPActions } from '@components/WideRHPContextProvider' ;
@@ -76,6 +77,7 @@ function MoneyRequestReportTransactionsNavigation({currentTransactionID, isFromR
7677 const [ betas ] = useOnyx ( ONYXKEYS . BETAS ) ;
7778 const [ isSelfTourViewed ] = useOnyx ( ONYXKEYS . NVP_ONBOARDING , { selector : hasSeenTourSelector } ) ;
7879 const [ hasCompletedGuidedSetupFlow ] = useOnyx ( ONYXKEYS . NVP_ONBOARDING , { selector : hasCompletedGuidedSetupFlowSelector } ) ;
80+ const personalDetails = usePersonalDetails ( ) ;
7981
8082 const currentTransactionIndex = transactionIDsList . findIndex ( ( id ) => id === currentTransactionID ) ;
8183
@@ -212,7 +214,7 @@ function MoneyRequestReportTransactionsNavigation({currentTransactionID, isFromR
212214 // hydrate it on arrival.
213215 const nextDescriptor = nextTransactionID ? siblingDescriptorsByTransactionID ?. [ nextTransactionID ] : undefined ;
214216 if ( nextDescriptor ) {
215- const nextReportID = getReportIDToOpenForExpense ( nextDescriptor , { introSelected, betas, currentUserEmail : email , currentUserAccountID : accountID } ) ;
217+ const nextReportID = getReportIDToOpenForExpense ( nextDescriptor , { introSelected, betas, currentUserEmail : email , currentUserAccountID : accountID , personalDetails } ) ;
216218 markReportRHPWidth ( nextReportID , 'wide' ) ;
217219 requestAnimationFrame ( ( ) => startTransition ( ( ) => Navigation . setParams ( { reportID : nextReportID , reportActionID : undefined , anchorTransactionID : nextTransactionID , backTo} ) ) ) ;
218220 return ;
@@ -230,6 +232,7 @@ function MoneyRequestReportTransactionsNavigation({currentTransactionID, isFromR
230232 iouReport : nextTransactionParentReport ,
231233 iouReportAction : nextParentReportAction ,
232234 transaction : nextTransaction ,
235+ personalDetails,
233236 isSelfTourViewed,
234237 hasCompletedGuidedSetupFlow,
235238 } ) ;
@@ -265,7 +268,7 @@ function MoneyRequestReportTransactionsNavigation({currentTransactionID, isFromR
265268 // See onNext: resolve the target sibling lazily from its descriptor when present.
266269 const prevDescriptor = prevTransactionID ? siblingDescriptorsByTransactionID ?. [ prevTransactionID ] : undefined ;
267270 if ( prevDescriptor ) {
268- const prevReportID = getReportIDToOpenForExpense ( prevDescriptor , { introSelected, betas, currentUserEmail : email , currentUserAccountID : accountID } ) ;
271+ const prevReportID = getReportIDToOpenForExpense ( prevDescriptor , { introSelected, betas, currentUserEmail : email , currentUserAccountID : accountID , personalDetails } ) ;
269272 markReportRHPWidth ( prevReportID , 'wide' ) ;
270273 requestAnimationFrame ( ( ) => startTransition ( ( ) => Navigation . setParams ( { reportID : prevReportID , reportActionID : undefined , anchorTransactionID : prevTransactionID , backTo} ) ) ) ;
271274 return ;
@@ -287,6 +290,7 @@ function MoneyRequestReportTransactionsNavigation({currentTransactionID, isFromR
287290 transaction : prevTransaction ,
288291 isSelfTourViewed,
289292 hasCompletedGuidedSetupFlow,
293+ personalDetails,
290294 } ) ;
291295 const targetReportID = optimisticThread ?. reportID ?? prevTransaction . reportID ;
292296 markReportRHPWidth ( targetReportID , 'wide' ) ;
0 commit comments