Skip to content

Commit e301846

Browse files
committed
add report loader
1 parent 9d0adbd commit e301846

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

src/pages/TransactionDuplicate/Review.tsx

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@ import React, {useEffect, useMemo} from 'react';
33
import {View} from 'react-native';
44
import FullPageNotFoundView from '@components/BlockingViews/FullPageNotFoundView';
55
import Button from '@components/Button';
6-
import FullscreenLoadingIndicator from '@components/FullscreenLoadingIndicator';
76
import HeaderWithBackButton from '@components/HeaderWithBackButton';
7+
import ReportHeaderSkeletonView from '@components/ReportHeaderSkeletonView';
88
import ScreenWrapper from '@components/ScreenWrapper';
99
import Text from '@components/Text';
10+
import ReportActionsSkeletonView from '@components/ReportActionsSkeletonView';
1011
import useCurrentUserPersonalDetails from '@hooks/useCurrentUserPersonalDetails';
1112
import useLocalize from '@hooks/useLocalize';
1213
import useOnyx from '@hooks/useOnyx';
@@ -60,7 +61,7 @@ function TransactionDuplicateReview() {
6061
const hasSettledOrApprovedTransaction = transactions?.some((transaction) => isSettled(transaction?.reportID) || isReportIDApproved(transaction?.reportID));
6162

6263
useEffect(() => {
63-
if (!report?.reportID || !route.params.threadReportID) {
64+
if (!route.params.threadReportID || report?.reportID) {
6465
return;
6566
}
6667
openReport(route.params.threadReportID);
@@ -72,7 +73,14 @@ function TransactionDuplicateReview() {
7273
const shouldShowNotFound = !isLoadingReport && !transactionID;
7374

7475
if (isLoadingReport) {
75-
return <FullscreenLoadingIndicator />;
76+
return (
77+
<ScreenWrapper testID={TransactionDuplicateReview.displayName}>
78+
<View style={[styles.borderBottom]}>
79+
<ReportHeaderSkeletonView onBackButtonPress={Navigation.goBack} />
80+
</View>
81+
<ReportActionsSkeletonView />
82+
</ScreenWrapper>
83+
);
7684
}
7785

7886
return (

0 commit comments

Comments
 (0)