From cbca70c4e10fc359170a080ab543aac3e32e22d5 Mon Sep 17 00:00:00 2001 From: dukenv0307 Date: Fri, 4 Aug 2023 17:38:30 +0700 Subject: [PATCH] refactor flag page --- src/pages/FlagCommentPage.js | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/src/pages/FlagCommentPage.js b/src/pages/FlagCommentPage.js index 4db182f863d5..0b850e6c3849 100644 --- a/src/pages/FlagCommentPage.js +++ b/src/pages/FlagCommentPage.js @@ -19,7 +19,6 @@ import * as ReportUtils from '../libs/ReportUtils'; import * as ReportActionsUtils from '../libs/ReportActionsUtils'; import * as Session from '../libs/actions/Session'; import FullPageNotFoundView from '../components/BlockingViews/FullPageNotFoundView'; -import FullscreenLoadingIndicator from '../components/FullscreenLoadingIndicator'; import withReportAndReportActionOrNotFound from './home/report/withReportAndReportActionOrNotFound'; const propTypes = { @@ -40,16 +39,12 @@ const propTypes = { }), }).isRequired, - /** Indicates whether the report data is loading */ - isLoadingReportData: PropTypes.bool, - ...withLocalizePropTypes, }; const defaultProps = { reportActions: {}, report: {}, - isLoadingReportData: true, }; /** @@ -156,19 +151,10 @@ function FlagCommentPage(props) { /> )); - const isLoadingInitialReport = props.isLoadingReportData && _.isEmpty(props.report); - const isLoadingInitialReportActions = _.isEmpty(props.reportActions) || (props.report.isLoadingReportActions && _.isEmpty(getActionToFlag())); - const isExistReport = isLoadingInitialReport || (!_.isEmpty(props.report) && !!props.report.reportID); - - const shouldShowLoading = (isLoadingInitialReport || isLoadingInitialReportActions) && isExistReport; - if (shouldShowLoading) { - return ; - } - return ( {({safeAreaPaddingBottomStyle}) => ( - +