From ac2860907f6c34e93301510b0b1bb41745341220 Mon Sep 17 00:00:00 2001 From: tienifr Date: Mon, 18 Dec 2023 13:35:23 +0700 Subject: [PATCH 1/2] fix: loading shows even though not found in profile page --- src/pages/ProfilePage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/ProfilePage.js b/src/pages/ProfilePage.js index 3772b8127ef7..62c7ed75a9f0 100755 --- a/src/pages/ProfilePage.js +++ b/src/pages/ProfilePage.js @@ -125,7 +125,7 @@ function ProfilePage(props) { const isCurrentUser = props.session.accountID === accountID; const hasMinimumDetails = !_.isEmpty(details.avatar); - const isLoading = lodashGet(details, 'isLoading', false) || _.isEmpty(details) || props.isLoadingReportData; + const isLoading = lodashGet(details, 'isLoading', false) || _.isEmpty(details); // If the API returns an error for some reason there won't be any details and isLoading will get set to false, so we want to show a blocking screen const shouldShowBlockingView = !hasMinimumDetails && !isLoading; From 52183ad09e062fd419122a37cf707498e1c6ca21 Mon Sep 17 00:00:00 2001 From: tienifr Date: Mon, 18 Dec 2023 14:13:07 +0700 Subject: [PATCH 2/2] fix lint --- src/pages/ProfilePage.js | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/pages/ProfilePage.js b/src/pages/ProfilePage.js index 62c7ed75a9f0..b50798f2d856 100755 --- a/src/pages/ProfilePage.js +++ b/src/pages/ProfilePage.js @@ -57,9 +57,6 @@ const propTypes = { /** Route params */ route: matchType.isRequired, - /** Indicates whether the app is loading initial data */ - isLoadingReportData: PropTypes.bool, - /** Session info for the currently logged in user. */ session: PropTypes.shape({ /** Currently logged in user accountID */ @@ -72,7 +69,6 @@ const propTypes = { const defaultProps = { // When opening someone else's profile (via deep link) before login, this is empty personalDetails: {}, - isLoadingReportData: true, session: { accountID: 0, }, @@ -288,9 +284,6 @@ export default compose( personalDetails: { key: ONYXKEYS.PERSONAL_DETAILS_LIST, }, - isLoadingReportData: { - key: ONYXKEYS.IS_LOADING_REPORT_DATA, - }, session: { key: ONYXKEYS.SESSION, },