@@ -5,6 +5,7 @@ import DatePicker from '@components/DatePicker';
55import FormProvider from '@components/Form/FormProvider' ;
66import InputWrapper from '@components/Form/InputWrapper' ;
77import type { FormOnyxValues } from '@components/Form/types' ;
8+ import FullScreenLoadingIndicator from '@components/FullscreenLoadingIndicator' ;
89import TimeModalPicker from '@components/TimeModalPicker' ;
910import useLocalize from '@hooks/useLocalize' ;
1011import useOnyx from '@hooks/useOnyx' ;
@@ -31,6 +32,9 @@ type IOURequestStepTimeProps = WithWritableReportOrNotFoundProps<typeof SCREENS.
3132 /** Holds data related to Money Request view state, rather than the underlying Money Request data. */
3233 transaction : OnyxEntry < OnyxTypes . Transaction > ;
3334
35+ /** Indicates whether the transaction data is loading */
36+ isLoadingTransaction ?: boolean ;
37+
3438 /** The report linked to the transaction */
3539 report : OnyxEntry < Report > ;
3640} ;
@@ -41,6 +45,7 @@ function IOURequestStepTime({
4145 name,
4246 } ,
4347 transaction,
48+ isLoadingTransaction,
4449 report,
4550} : IOURequestStepTimeProps ) {
4651 const styles = useThemeStyles ( ) ;
@@ -121,6 +126,10 @@ function IOURequestStepTime({
121126 [ CONST . IOU . TYPE . CREATE ] : translate ( 'iou.createExpense' ) ,
122127 } ;
123128
129+ if ( isLoadingTransaction ) {
130+ return < FullScreenLoadingIndicator style = { [ styles . flex1 , styles . pRelative ] } /> ;
131+ }
132+
124133 return (
125134 < StepScreenWrapper
126135 headerTitle = { backTo ? translate ( 'iou.time' ) : tabTitles [ iouType ] }
0 commit comments