Skip to content

Commit

Permalink
Merge pull request #34329 from dukenv0307/fix/33351
Browse files Browse the repository at this point in the history
Change logic page not found in profile page
  • Loading branch information
AndrewGable authored Feb 28, 2024
2 parents 59f8f3d + 2af8886 commit 4178430
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions src/pages/ProfilePage.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,11 @@ import {withOnyx} from 'react-native-onyx';
import _ from 'underscore';
import AutoUpdateTime from '@components/AutoUpdateTime';
import Avatar from '@components/Avatar';
import BlockingView from '@components/BlockingViews/BlockingView';
import FullPageNotFoundView from '@components/BlockingViews/FullPageNotFoundView';
import CommunicationsLink from '@components/CommunicationsLink';
import FullScreenLoadingIndicator from '@components/FullscreenLoadingIndicator';
import HeaderWithBackButton from '@components/HeaderWithBackButton';
import * as Expensicons from '@components/Icon/Expensicons';
import * as Illustrations from '@components/Icon/Illustrations';
import MenuItem from '@components/MenuItem';
import MenuItemWithTopDescription from '@components/MenuItemWithTopDescription';
import OfflineWithFeedback from '@components/OfflineWithFeedback';
Expand All @@ -30,7 +28,6 @@ import {parsePhoneNumber} from '@libs/PhoneNumber';
import * as ReportUtils from '@libs/ReportUtils';
import * as UserUtils from '@libs/UserUtils';
import * as ValidationUtils from '@libs/ValidationUtils';
import variables from '@styles/variables';
import * as PersonalDetails from '@userActions/PersonalDetails';
import * as Report from '@userActions/Report';
import * as Session from '@userActions/Session';
Expand Down Expand Up @@ -145,7 +142,7 @@ function ProfilePage(props) {

return (
<ScreenWrapper testID={ProfilePage.displayName}>
<FullPageNotFoundView shouldShow={CONST.RESTRICTED_ACCOUNT_IDS.includes(accountID)}>
<FullPageNotFoundView shouldShow={shouldShowBlockingView || CONST.RESTRICTED_ACCOUNT_IDS.includes(accountID)}>
<HeaderWithBackButton
title={props.translate('common.profile')}
onBackButtonPress={() => Navigation.goBack(navigateBackTo)}
Expand Down Expand Up @@ -251,16 +248,6 @@ function ProfilePage(props) {
</ScrollView>
)}
{!hasMinimumDetails && isLoading && <FullScreenLoadingIndicator style={styles.flex1} />}
{shouldShowBlockingView && (
<BlockingView
icon={Illustrations.ToddBehindCloud}
iconWidth={variables.modalTopIconWidth}
iconHeight={variables.modalTopIconHeight}
title={props.translate('notFound.notHere')}
shouldShowLink
link={props.translate('notFound.goBackHome')}
/>
)}
</View>
</FullPageNotFoundView>
</ScreenWrapper>
Expand Down

0 comments on commit 4178430

Please sign in to comment.