Skip to content

Commit

Permalink
Merge pull request Expensify#33209 from tienifr/fix/32750
Browse files Browse the repository at this point in the history
Fix: Loading shows even though not found in `ProfilePage`
  • Loading branch information
puneetlath authored Dec 20, 2023
2 parents bd7629e + cf24f63 commit 7298819
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/pages/ProfilePage.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand All @@ -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,
},
Expand Down Expand Up @@ -125,7 +121,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;
Expand Down Expand Up @@ -288,9 +284,6 @@ export default compose(
personalDetails: {
key: ONYXKEYS.PERSONAL_DETAILS_LIST,
},
isLoadingReportData: {
key: ONYXKEYS.IS_LOADING_REPORT_DATA,
},
session: {
key: ONYXKEYS.SESSION,
},
Expand Down

0 comments on commit 7298819

Please sign in to comment.